\documentclass[11pt]{book}

%\RequirePackage[12tabu, orthodox]{nag}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                                                 %
% The mathematical style of these documents follows                                               %
%                                                                                                 %
% A. Thompson and B.N. Taylor. The NIST Guide for the Use of the International System of Units.   %
%    NIST Special Publication 881, 2008.                                                          %
%                                                                                                 %
% http://www.nist.gov/pml/pubs/sp811/index.cfm                                                    %
%                                                                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input{../Bibliography/commoncommands}
\IfFileExists{../Bibliography/gitrevision.tex}
{\input{../Bibliography/gitrevision}}
{\newcommand{\gitrevision}{unknown} }

\externaldocument{FDS_User_Guide}

\begin{document}

\bibliographystyle{unsrt}
\pagestyle{empty}



\begin{minipage}[t][9in][s]{6.5in}

\headerA{1018-2\\
Sixth Edition\\
}

\headerB{
Fire Dynamics Simulator\\
Technical Reference Guide\\
Volume 2: Verification\\
}

\headerC{
\authortitlesigs
}

\vfill

\headerD{1018}

\vfill

\logosigs

\end{minipage}

\newpage

\hspace{5in}

\newpage

\begin{minipage}[t][9in][s]{6.5in}

\headerA{1018-2\\
Sixth Edition\\
}

\headerB{
Fire Dynamics Simulator\\
Technical Reference Guide\\
Volume 2: Verification\\
}

\headerC{
\authorsigs
}

\headerD{1018}

\headerC{
\today \\
Revision:~\gitrevision}


\vfill

\begin{flushright}
\includegraphics[width=1in]{../Bibliography/doc}
\end{flushright}

\titlesigs

\end{minipage}

\newpage

\disclaimer{1018-2}





\newpage

\frontmatter

\pagestyle{plain}

\input{../Bibliography/authors}


\chapter{Preface}

This is Volume 2 of the FDS Technical Reference Guide~\cite{FDS_Tech_Guide}. Volume 1 describes the mathematical model and
numerical method. Volume 3 documents past and present experimental validation work. Instructions for
using FDS are contained in a separate User's Guide~\cite{FDS_Users_Guide}.

The three volumes of the FDS Technical Reference Guide are based in part on the ``Standard Guide for
Evaluating the Predictive Capability of Deterministic Fire Models,'' ASTM~E~1355~\cite{ASTM:E1355}.
ASTM~E~1355 defines {\em model evaluation} as ``the process of quantifying
the accuracy of chosen results from a model when applied for a specific use.''
The model evaluation process consists of two main components: verification and validation.
{\em Verification} is a process to check the correctness of the solution of the
governing equations. Verification does not imply that the governing equations are
appropriate; only that the equations are being solved correctly.
{\em Validation} is a process to determine the appropriateness of the governing equations as a mathematical
model of the physical phenomena of interest. Typically, validation involves comparing
model results with experimental measurement. Differences that cannot be explained in terms of
numerical errors in the model or uncertainty in the measurements
are attributed to the assumptions and simplifications of the physical model.

Evaluation is critical to establishing both the acceptable uses
and limitations of a model. Throughout its development, FDS has undergone various forms of evaluation.
This volume provides a survey of verification work conducted to date to evaluate FDS.


% \chapter{Disclaimer}
\input{../Bibliography/disclaimer}


\chapter{Acknowledgments}

\label{acksection}

The following individuals contributed to the verification process of FDS.
\begin{itemize}
\item Chris Lautenberger and Carlos Fernandez-Pello contributed the ``two-reaction'' test case.
\item Matthias M\"{u}nch of the Freie Universit\"{a}t Berlin provided useful test cases for the basic flow solver.
\item Clara Cruz, a student at the University of Puerto Rico and Summer Undergraduate Research Fellow at NIST, helped develop useful Matlab scripts to automate the process of compiling this guide.
\item Bryan Klein, now at Thunderhead Engineering, developed the source code version control system that is an essential part of the verification process.
\item Joonas Ryyn\"{a}nen of VTT, Finland, designed and documented the FED/FIC test cases.
\item Max Gould, Summer Undergraduate Research Fellow, helped develop and produce the ``2D Vortex'' test case.
\item Howard Baum, NIST Fellow Emeritus, contributed the analytical solution ``Collapse of a Hot Layer in a Micro-gravity Environment''.
\item Tony Saad and James Sutherland of the University of Utah developed an analysis for temporal order of accuracy for variable-density projection schemes.
\item Chao Zhang of Tongji University provided the finite-element analysis for the HT3D I-beam test case.
\item Salah Benkorichi of Ulster University, Belfast, developed the HT3D sphere test case.
\item Kiyoung Moon and Jung-il Choi of Yonsei University, Seoul, South Korea, provided the Heat Channel Flow case.
\end{itemize}


\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables

\mainmatter


\chapter{What is Verification?}

The terms {\em verification} and {\em validation} are often used interchangeably to mean the process of checking the
accuracy of a numerical model. For many, this entails comparing model predictions with experimental measurements. However,
there is now a fairly broad-based consensus that comparing model and experiment is largely what is considered {\em validation}. So what is
{\em verification}? ASTM~E~1355~\cite{ASTM:E1355}, ``Standard Guide for
Evaluating the Predictive Capability of Deterministic Fire Models,'' defines verification as
\begin{quote}
The process of determining that the implementation of a calculation method accurately
represents the developer's conceptual description of the calculation method and the solution to the calculation method.
\end{quote}
and it defines validation as
\begin{quote}
The process of determining the degree to which a calculation method is an accurate representation of the real world
from the perspective of the intended uses of the calculation method.
\end{quote}
Simply put, verification is a check of the math; validation is a check of the physics. If the model predictions closely match
the results of experiments, using whatever metric is appropriate, it is assumed by most that the model suitably describes, via
its mathematical equations, what is happening. It is also assumed that the solution of these equations must be correct. So why do
we need to perform model verification? Why not just skip to validation and be done with it? The reason is that rarely do model and
measurement agree so well in all applications that anyone would unquestionably just accept the results. Because there is
inevitably differences between model and experiment, we need to know if these differences are due to limitations or errors in
the numerical solution, or physical sub-models, or both.

Whereas model validation consists mainly of comparing predictions with measurements, as documented for FDS in Volume 3 of the
Technical Reference Guide, model verification consists of a much broader range of activities, from checking the computer program
itself to comparing calculations to analytical (exact) solutions to considering the sensitivity of the dozens of numerical
parameters. The next chapter discusses these various activities, and the rest of the Guide is devoted mainly to comparisons of
various sub-model calculations with analytical solutions.








\chapter{Survey of Past Verification Work}

This chapter documents work of the past few decades at NIST, VTT and elsewhere to verify the algorithms within FDS.




\section{Analytical Tests}

\label{Analytical Tests}

Most realistic combustion processes, including fire, are turbulent and time-dependent. There are no closed-form mathematical solutions for the
fully-turbulent, time-dependent Navier-Stokes equations. CFD provides an approximate solution for the non-linear partial differential equations that describe fluid flow by
replacing them with discretized algebraic equations that can be solved using a powerful computer. While there is no general analytical solution for
fully-turbulent flows, certain sub-models address phenomenoa that do have analytical solutions, for example, one-dimensional heat conduction through
a solid. These analytical solutions can be used to test sub-models within a complex code such as FDS. The developers of FDS routinely use such
practices to verify the correctness of the coding of the model~\cite{Mell:1,McGrattan:4}. Such verification efforts are relatively simple and routine
and the results may not always be published nor included in the documentation. Examples of routine analytical testing include:
\begin{itemize}
\item The radiation solver has been verified for scenarios in which
simple objects, like cubes or flat plates, are positioned in simple, sealed compartments. All convective motion is turned off, the object is given a
fixed surface temperature and emissivity of one (making it a black body radiator). The heat flux to the cold surrounding walls is recorded and
compared to analytical solutions.  These studies help determine the appropriate number of solid angles to be set as the default.
\item Solid objects are heated with a fixed heat flux, and the
interior and surface temperatures as a function of time are compared to analytical solutions of the one-dimensional heat transfer equation. These
studies help determine the number of nodes to use in the solid phase heat transfer model. Similar studies are performed to check the pyrolysis models
for thermoplastic and charring solids.
\item Early in its development, the hydrodynamic solver that evolved
to form the core of FDS was checked against analytical solutions of simplified fluid flow phenomena. These studies were conducted at the National
Bureau of Standards (NBS)\footnote{The National Institute of Standards and Technology (NIST) was formerly known as the National Bureau of Standards.}
by Rehm, Baum and co-workers~\cite{Rehm:SIAM83,Rehm:SIAM84,Baum:CST84,Rehm:ANM85}. The emphasis of this early work was to test the stability and
consistency of the basic hydrodynamic solver, especially the velocity-pressure coupling that is vitally important in low Mach number applications.
Many numerical algorithms developed to that point in time were intended for use in high-speed flow applications, like aerospace. Many of the
techniques adopted by FDS were originally developed for meteorological models, and as such needed to be tested to assess whether they would be
appropriate to describe relatively low-speed flow within enclosures.
\item A fundamental decision made by Rehm and Baum early in the FDS
development was to use a direct (rather than iterative) solver for the pressure. In the low Mach number formulation of the Navier-Stokes equations,
an elliptic partial differential equation for the pressure emerges, often referred to as the Poisson equation. Most CFD methods use iterative
techniques to solve the governing conservation equations to avoid the necessity of directly solving the Poisson equation. The reason for this is that
the equation is time-consuming to solve numerically on anything but a rectilinear grid. Because FDS is designed specifically for rectilinear grids,
it can exploit fast, direct solvers of the Poisson equation, obtaining the pressure field with one pass through the solver to machine accuracy. FDS
employs double-precision (8 byte) arithmetic, meaning that the relative difference between the computed and the exact solution of the discretized
Poisson equation is on the order of $10^{-12}$. The fidelity of the numerical solution of the entire system of equations is tied to the
pressure/velocity coupling because often simulations can involve hundreds of thousands of time steps, with each time step consisting of two solutions
of the Poisson equation to preserve second-order accuracy. Without the use of the direct Poisson solver, build-up of numerical error over the course
of a simulation could produce spurious results. Indeed, an attempt to use single-precision (4 byte) arithmetic to conserve machine memory led to
spurious results simply because the error per time step built up to an intolerable level.
\end{itemize}



\section{Numerical Tests}

\label{Numerical Tests}


Numerical techniques used to solve the governing equations within a model can be a source of error in the predicted results.  The hydrodynamic model
within FDS is second-order accurate in space and time.  This means that the error terms associated with the approximation of the spatial partial
derivatives by finite differences is of the order of the square of the grid cell size, and likewise the error in the approximation of the temporal
derivatives is of the order of the square of the time step. As the numerical grid is refined, the ``discretization error'' decreases, and a more
faithful rendering of the flow field emerges.  The issue of grid sensitivity is extremely important to the proper use of the model and will be taken
up in the next chapter.

A common technique of testing flow solvers is to systematically refine the numerical grid until the computed solution does not change, at which point
the calculation is referred to as a Direct Numerical Solution (DNS) of the governing equations.  For most practical fire scenarios, DNS is not
possible on conventional computers. However, FDS does have the option of running in DNS mode, where the Navier-Stokes equations are solved without
the use of sub-grid scale turbulence models of any kind. Because the basic numerical method is the same for LES and DNS, DNS calculations are a very
effective way to test the basic solver, especially in cases where the solution is steady-state. Throughout its development, FDS has been used in DNS
mode for special applications.  For example, FDS (or its core algorithms) have been used at a grid resolution of roughly 1~mm to look at flames
spreading over paper in a microgravity environment~\cite{McGrattan:CF1996,Kashiwagi:CS1996,Mell:CS98,Mell:CS00,Prasad:CS2002,Nakamura:CF2002}, as
well as ``g-jitter'' effects aboard spacecraft~\cite{Mell:g-jitter}. Simulations have been compared to experiments performed aboard the US Space
Shuttle.  The flames are laminar and relatively simple in structure, and the comparisons are a qualitative assessment of the model solution. Similar
studies have been performed comparing DNS simulations of a simple burner flame to laboratory experiments~\cite{Mukhopadhyay:1}. Another study
compared FDS simulations of a counterflow diffusion flames to experimental measurements and the results of a one-dimensional multi-step kinetics
model~\cite{Hamins:NASA}.

Early work with the hydrodynamic solver compared two-dimensional simulations of gravity currents with salt-water experiments~\cite{McGrattan:1}. In
these tests, the numerical grid was systematically refined until almost perfect agreement with experiment was obtained. Such convergence would not be
possible if there were a fundamental flaw in the hydrodynamic solver.




\section{Sensitivity Analysis}

A sensitivity  analysis considers the  extent to which  uncertainty in model  inputs influences  model output.  Model parameters  can  be the
physical properties of solids  and gases, boundary conditions, initial conditions, etc. The parameters  can also be  purely numerical, like
the size  of the numerical grid. FDS  typically requires the user to  provide several  dozen different  types of  input  parameters that describe the
geometry, materials,  combustion phenomena, etc. By design,  the user  is  not expected  to  provide numerical  parameters besides the grid
size,  although the optional numerical parameters are described in both the Technical Reference Guide and the User's Guide.

FDS does not  limit the range of most of  the input parameters because applications often push beyond the  range for which the model has been
validated.  FDS is used  for research at NIST, VTT, and elsewhere, and the developers do not presume to know in all cases what the acceptable range is
of any  parameter.  Plus,  FDS   solves  the  fundamental conservation  equations  and  is   much  less  susceptible  to  errors resulting
from  input parameters  that  stray  beyond  the limits  of simpler empirical models.  However, the user is warned  that he/she is responsible for
the prescription of all parameters.   The FDS manuals can only provide guidance.

The grid size is the  most important numerical parameter in the model, as it  dictates the spatial  and temporal accuracy of  the discretized partial
differential equations.  The heat  release rate  is  the most important physical parameter,  as it is the source  term in the energy equation.
Property data, like  the thermal conductivity, density, heat of vaporization,  heat capacity, etc., ought to be  assessed in terms of their
influence on  the heat release rate. Validation studies \cite{FDS_Validation_Guide} have shown that FDS predicts well the transport of heat and smoke when the HRR is prescribed.
In  such cases, minor changes in the properties of  bounding  surfaces  do  not  have  a  significant  impact  on  the results. However, when the HRR
is not prescribed, but rather predicted by the  model using  the thermophysical properties  of the  fuels, the model output is sensitive to even
minor changes in these properties.

The sensitivity  analyses described in this chapter  are all performed in basically the same way. For a given scenario, best estimates of all the
relevant  physical  and  numerical  parameters are  made,  and  a ``baseline'' simulation is performed. Then, one by one, parameters are varied by a
given percentage, and the changes in predicted results are recorded.  This is  the simplest  form of  sensitivity  analysis. More sophisticated
techniques that involve  the simultaneous  variation of several  parameters  are impractical  with  a  CFD  model because  the computation time is
too long and the number of parameters too large to perform  the  necessary  number  of calculations  to  generate  decent statistics.



\subsection{Grid Sensitivity}

\label{gridsen}

The most  important decision made by a  model user is the  size of the numerical grid. In  general, the finer the numerical  grid, the better the
numerical solution of  the equations. FDS is second-order accurate in  space and  time,  meaning that  halving  the grid  cell size  will decrease
the discretization  error in  the governing  equations  by a factor  of 4.  Because  of  the non-linearity  of  the equations,  the decrease in
discretization error does not necessarily translate into a comparable decrease  in the error of  a given FDS  output quantity. To find out  what
effect a  finer grid has  on the solution,  model users usually  perform some  form of  grid  sensitivity study  in which  the numerical grid  is
systematically refined until  the output quantities do not change  appreciably with each refinement. Of  course, with each halving of  the grid cell
size,  the time required  for the simulation increases by  a factor of $2^4=16$  (a factor of two  for each spatial coordinate, plus  time). In  the
end, a  compromise is  struck between model accuracy and computer capacity.

Some   grid    sensitivity   studies   have    been   documented   and published. Since FDS was  first publicly released in 2000, significant changes
in  the   combustion  and   radiation  routines   have  been incorporated into the model. However, the basic transport algorithm is the  same, as  is
the  critical importance  of  grid sensitivity.  In compiling   sensitivity  studies,   only  those   that   examined  the sensitivity of routines no
longer used have been excluded.

As part of  a project to evaluate  the use of FDS version  1 for large scale   mechanically  ventilated   enclosures,  Friday and Mowrer~\cite{Friday:1}
performed a  sensitivity analysis to find  the approximate calculation time based on varying grid sizes. A propylene fire with a nominal heat release
rate was  modeled in FDS. There was  no mechanical ventilation and  the fire  was assumed  to grow  as a  function of  the  time from ignition
squared.  The  compartment  was   a  3~m  by  3~m  by  6.1~m space. Temperatures  were sampled 12~cm  below the ceiling.  Four grid sizes   were
chosen  for   the   analysis:   30~cm,  15~cm,   10~cm, 7.5~cm. Temperature  estimates were  not found to  change dramatically with different grid
dimensions.

Using FDS  version 1, Bounagui et al.~\cite{Bounagui:1} studied the effect of grid size on simulation results to determine the nominal grid
size for future work. A propane burner 0.1~m by 0.1~m was modeled with  a heat  release rate  of  1,500~kW.   A similar analysis was performed using
Alpert's ceiling  jet correlation~\cite{SFPE:Alpert}  that also showed better  predictions   with smaller grid sizes.  In a  related study,  Bounagui et al.~\cite{Bounagui:2} used  FDS to  evaluate  the emergency  ventilation  strategies in  the Louis-Hippolyte-La Fontaine Tunnel in
Montreal, Canada.


Xin~\cite{Xin:NFPA2004}  used FDS  to  model a  methane fueled  square burner (1~m  by 1~m) in  the open. Engineering correlations  for plume
centerline temperature and velocity  profiles were compared with model predictions to assess the influence of the numerical grid and the size of the
computational domain. The  results showed that FDS is sensitive to grid size effects, especially  in the region near the fuel surface, and domain
size  effects when the domain width is  less than twice the plume  width.  FDS  uses   a  constant  pressure  assumption  at  open boundaries.  This
assumption  will affect  the plume  behavior  if the boundary of the computational domain is too close to the plume.

Ierardi  and Barnett~\cite{Ierardi:1} used  FDS version  3 to  model a 0.3~m square methane diffusion burner with heat release rate values in the
range of 14.4~kW to 57.5~kW. The physical domain used was 0.6~m by 0.6~m with uniform grid spacings of  15~cm, 10~cm, 7.5~cm, 5~cm, 3~cm, 1.5~cm for all three
coordinate  directions. For both  fire sizes, a grid  spacing of 1.5~cm  was found  to  provide  the best  agreement  when compared  to McCaffrey's
centerline    plume    temperature     and    velocity correlations~\cite{SFPE:Heskestad}.  Two similar  scenarios  that form the basis for Alpert's
ceiling  jet correlation were also modeled with FDS. The first scenario was a  1~m by 1~m, 670~kW ethanol fire under a 7~m   high  unconfined
ceiling.   The  planar   dimensions  of   the computational domain were 14~m by  14~m. Four uniform grid spacings of 50~cm, 33.3~cm, 25~cm, and 20~cm were
used in the modeling. The best agreement for  maximum  ceiling  jet  temperature  was  with  the  33.3~cm  grid spacing. The best  agreement for
maximum ceiling jet  velocity was for the  50~cm grid  spacing. The  second scenario  was a  0.6~m  by 0.6~m 1,000~kW ethanol fire under a 7.2~m high
unconfined ceiling. The planar dimensions of  the computational domain  were 14.4~m by  14.4~m. Three uniform  grid  spacings  of  60~cm, 30~cm, and
20~cm  were  used  in  the modeling. The  results show that  the 60~cm grid spacing  exhibits the best  agreement with  the correlations  for both
maximum  ceiling jet temperature and velocity on a qualitative basis.

Petterson~\cite{Petterson:1} also completed work assessing the optimal grid size for FDS version 2. The FDS model predictions of varying grid sizes
were  compared to two separate fire  experiments: The University of Canterbury  McLeans Island  Tests and the  US Navy Hangar  Tests in Hawaii.  The
first  set  of  tests utilized  a  room with  approximate dimensions of  2.4~m by  3.6~m by  2.4~m and fire  sizes of  55~kW and 110~kW. The  Navy
Hangar  tests were performed  in a  hangar measuring 98~m by 74~m by 15~m in height and had fires in the range of 5.5~MW to 6.6~MW. The results  of
this study indicate that  FDS simulations with grids of 0.15~m had temperature predictions as accurate as models with grids as  small as 0.10~m. Each
of these grid  sizes produced results within   15~\%   of   the   University   of   Canterbury   temperature measurements. The 0.30~m grid  produced
less accurate results. For the comparison of the Navy Hangar tests, grid sizes ranging from 0.60~m to 1.80~m yielded results of comparable accuracy.

Musser et  al.~\cite{Musser:1} investigated  the use of  FDS for course grid  modeling of non-fire and fire  scenarios. Determining the
appropriate  grid  size was  found  to  be  especially important  with respect  to heat  transfer  at heated  surfaces.  The convective  heat
transfer  from the  heated surfaces  was most  accurate when  the near surface grid cells were smaller than the depth of the thermal boundary layer.
However, a  finer grid  size  produced better  results at  the expense of computational time. Accurate contaminant dispersal modeling required a
significantly finer grid. The results of her study indicate that  non-fire simulations  can be  completed more  quickly  than fire simulations
because  the time  step is not  limited by the  large flow speeds in a fire plume.


\subsection{Sensitivity of Large Eddy Simulation Parameters}

FDS uses Deardorff's isotropic eddy viscosity along with the gradient diffusion hypothesis to close the subgrid stress in the LES equations.  The turbulent viscosity has the form
\be
  \mu_{\hbox{\tiny LES}} =  \rho \,  C_{\nu}\, \Delta \, \sqrt{k_{sgs}}
\ee
where $C_{\nu}$  is an empirical constant, $\Delta$ is a length on the order of the size of a grid cell, and $k_{sgs}$ is the unresolved (subgrid scale) kinetic energy. Related to the ``turbulent  viscosity'' are  comparable expressions  for  the thermal conductivity  and  material diffusivity:
\be
   k_{\hbox{\tiny LES}}  = \frac{\mu_{\hbox{\tiny  LES}}   \;  c_p}{\PR_t}
   \quad   ;  \quad  (\rho D)_{\hbox{\tiny  LES}}  =\frac{\mu_{\hbox{\tiny  LES}}}{\SC_t}
\ee
where $\PR_t$ and $\SC_t$ are the turbulent Prandtl and Schmidt numbers, respectively. Thus, $C_{\nu}$, $\PR_t$ and $\SC_t$ are a set of empirical constants.  Most FDS users simply use the default values of (0.1,0.5,0.5), but some have explored their effect on the solution of the equations.  The value of $C_{\nu}=0.1$ is a theoretical value developed from Lilly's analysis.  The value is confirmed for a canonical flow, decaying isotropic turbulence, within this volume.

Previous versions of FDS used the constant coefficient Smagorinsky model for the eddy viscosity. In an effort to validate FDS with some simple room temperature data, Zhang et al.~\cite{Zhang:2} tried different combinations of the Smagorinsky parameters, and suggested the current  default values. Of the  three parameters, the viscosity coefficient is the most sensitive.  Smagorinsky~\cite{Smagorinsky:1} originally proposed  a value of 0.23, but researchers over the past  three decades have used values ranging from 0.1 to 0.23. There are also refinements of the original Smagorinsky model~\cite{Germano:1,Lilly:1,Moin:1991} that do not require the user to prescribe the constants, but rather generate them automatically as part of the numerical scheme.

\subsection{Sensitivity of Radiation Parameters}

Radiative heat  transfer is  included in FDS  via the solution  of the radiation  transport equation for  a non-scattering  gray gas,  and in some
limited  cases using  a wide band  model. The equation  is solved using  a technique  similar to  finite volume  methods  for convective transport,
thus the  name given  to it  is the  Finite  Volume Method (FVM).  There  are  several  limitations  of  the  model.  First,  the absorption
coefficient  for the smoke-laden gas is  a complex function of  its  composition, wavelength, and temperature.  Because  of  the  simplified combustion  model,
the  chemical  composition of  the  smoky  gases, especially  the  soot content,  can  affect  both  the absorption  and emission  of thermal
radiation.  Second, the  radiation transport  is discretized via  approximately 100 solid angles. For  targets far away from  a  localized source  of
radiation,  like  a growing  fire,  the discretization can  lead to a non-uniform distribution  of the radiant energy. This can be seen in the
visualization of surface temperatures, where  ``hot spots'' show  the effect  of the  finite number  of solid angles. The  problem can  be lessened
by  the inclusion of  more solid angles, but at  a price of longer computing times.  In most cases, the radiative flux  to far-field targets is  not
as important  as those in the near-field, where coverage by the default number of angles is much better.

Hostikka~\cite{Hostikka:2008} examined the sensitivity of the radiation solver to changes in  the assumed soot production, number  of spectral bands, number
of control  angles, and  flame temperature.  Some of  the more interesting findings were:
\begin{itemize}
\item  Changing  the  soot  yield  from 1~\%  to  2~\%  increased  the radiative flux from a simulated methane burner about 15~\%
\item Lowering  the soot  yield to zero  decreased the  radiative flux about 20~\%.
\item Increasing  the number of  control angles by  a factor of  3 was necessary  to  ensure  the  accuracy  of the  model  at  the  discrete measurement locations.
\item Changing the number of spectral  bands from 6 to 10 did not have a strong effect on the results.
\item Errors of 100~\% in heat  flux were caused by errors of 20~\% in absolute temperature.
\end{itemize}
The  sensitivity  to  flame   temperature  and  soot  composition  are consistent with  combustion theory, which states that  the source term of the
radiative transport equation  is a function of  the absorption coefficient  multiplied  by the  absolute  temperature  raised to  the fourth  power.
The  number of  control angles  and spectral  bands are user-controlled numerical  parameters whose sensitivities  ought to be checked  for  each
new  scenario.  The  default  values  in  FDS  are appropriate for  most large scale fire  scenarios, but may  need to be refined for  more detailed
simulations  such as a  low-sooting methane burner.


\subsection{Sensitivity of Thermophysical Properties of Solid Fuels}

An  extensive amount  of  verification and  validation  work with  FDS version 4  has been  performed by Hietaniemi et al.~\cite{Hietaniemi:1} at VTT,
Finland. The case  studies are  comprised of fire  experiments   ranging  in   scale  from  the   cone  calorimeter (ISO~5660-1)
to  full-scale fire  tests such as  the room  corner test (ISO~9705).  Comparisons are also  made between  FDS results  and data obtained  in the
SBI (Single  Burning Item)  Euro-classification test apparatus (EN  13823) as  well as  data obtained in  two {\em  ad hoc} experimental
configurations:  one is similar  to the room  corner test but has only  partial linings and the other is a  space to study fires in building
cavities.

All of the  case studies involve real materials  whose properties must be prescribed  so as to conform  to the assumption in  FDS that solids are of
uniform composition backed by a material that is either cold or totally insulating. Sensitivity of the various physical properties and the boundary
conditions were tested. Some of the findings were:
\begin{itemize}
\item  The measured  burning  rates of  various  materials often  fell
between two FDS  predictions in which cold or  insulated backings were assumed for the solid surfaces. FDS lacks a multi-layer solid model.
\item  The ignition  time of  upholstery is  sensitive to  the thermal
properties  of the  fabric covering,  but the  steady burning  rate is sensitive to the properties of the underlying foam.
\item Moisture content of wooden fuels is very important and difficult
to measure.
\item Flame spread  over complicated objects, like cables  laid out in
trays, can be modeled if the  surface area of the simplified object is comparable to that  of the real object. This  suggests sensitivity not only to
physical properties,  but also geometry.  It is  difficult to quantify the extent of the geometrical sensitivity.
\end{itemize}
There is  little quantification of  the observed sensitivities  in the study. Fire  growth curves can be  linear to exponential  in form, and small
changes in  fuel  properties  can lead  to  order of  magnitude changes  in heat  release rate  for unconfined  fires. The  subject is
discussed  in the  FDS  Validation Guide \cite{FDS_Validation_Guide} where it is  noted in many of the studies  that predicting fire growth is difficult.

Recently, Lautenberger et al.~\cite{Lautenberger:FSJ} developed a method to automate the
process of  estimating material properties to input  into FDS. The methodology involves simulating a  bench-scale test with the model and iterating
via a ``genetic'' algorithm  to obtain  an  optimal set  of material  properties for  that  particular item.  Such techniques  are necessary because
most bench-scale apparatus do not provide a complete set of thermal properties.



\section{Code Checking}
\label{Code Checking}

An examination of the structure of the computer program can be used to detect potential errors in the numerical solution of the governing equations.
The coding can be verified by a third party either manually or automatically with profiling programs to detect irregularities and
inconsistencies~\cite{ASTM:E1355}.

At NIST, VTT, and elsewhere, FDS has been compiled and run on computers manufactured by IBM, Hewlett-Packard, Sun Microsystems, Digital Equipment
Corporation, Apple, Silicon Graphics, Dell, Compaq, and various other personal computer vendors. The operating systems on these platforms include
Unix, Linux, Microsoft Windows, and Mac OS X. Compilers used include Lahey Fortran, Digital Visual Fortran, Intel Fortran, IBM XL Fortran, HPUX
Fortran, Forte Fortran for SunOS, the Portland Group Fortran, and several others. Each combination of hardware, operating system and compiler
involves a slightly different set of compiler and run-time options and a rigorous evaluation of the source code to test its compliance with the
Fortran 90 ISO/ANSI standard~\cite{F90}. FDS is now compliant with the Fortran~2003 standard. Through this process, out-dated and potentially harmful code is updated or eliminated, and often the code is
streamlined to improve its optimization on the various machines. However, simply because the FDS source code can be compiled and run on a wide
variety of platforms does not guarantee that the numerics are correct. It is only the starting point in the process because it at least rules out the
possibility that erratic or spurious results are due to the platform on which the code is running.

Beyond hardware issues, there are several useful techniques for checking the FDS source code that have been developed over the years. One of the
best ways is to exploit symmetry. FDS is filled with thousands of lines of code in which the partial derivatives in the conservation equations are
approximated as finite differences. It is very easy in this process to make a mistake. Consider, for example, the finite difference approximation of
the thermal diffusion term in the $ijk$th cell of the three-dimensional grid:
\begin{eqnarray*}
(\nabla \cdot k \nabla T)_{ijk} &\approx&
              \frac{1}{\dx}
         \left[k_{i+\ha,jk}\frac{T_{i+1,jk}-T_{ijk}}{\dx}
              -k_{i-\ha,jk}\frac{T_{ijk}-T_{i-1,jk}}{\dx}\right]+  \nonumber \\
            &&\frac{1}{\dy}
         \left[k_{i,j+\ha,k}\frac{T_{i,j+1,k}-T_{ijk}}{\dy}
              -k_{i,j-\ha,k}\frac{T_{ijk}-T_{i,j-1,k}}{\dy}\right]+ \nonumber \\
            &&\frac{1}{\dz}
         \left[k_{ij,k+\ha}\frac{T_{ij,k+1}-T_{ijk}}{\dz}
              -k_{ij,k-\ha}\frac{T_{ijk}-T_{ij,k-1}}{\dz}\right]
\end{eqnarray*}
which is written as follows in the Fortran source code:
\begin{lstlisting}
      DTDX = (TMP(I+1,J,K)-TMP(I,J,K))*RDXN(I)
      KDTDX(I,J,K) = .5*(KP(I+1,J,K)+KP(I,J,K))*DTDX
      DTDY = (TMP(I,J+1,K)-TMP(I,J,K))*RDYN(J)
      KDTDY(I,J,K) = .5*(KP(I,J+1,K)+KP(I,J,K))*DTDY
      DTDZ = (TMP(I,J,K+1)-TMP(I,J,K))*RDZN(K)
      KDTDZ(I,J,K) = .5*(KP(I,J,K+1)+KP(I,J,K))*DTDZ

      DELKDELT = (KDTDX(I,J,K)-KDTDX(I-1,J,K))*RDX(I) +
                 (KDTDY(I,J,K)-KDTDY(I,J-1,K))*RDY(J) +
                 (KDTDZ(I,J,K)-KDTDZ(I,J,K-1))*RDZ(K)
\end{lstlisting}
This is one of the simpler constructs because the pattern that emerges within the lines of code make it fairly easy to check. However, a mis-typing
of an \textct{I} or a \textct{J}, a plus or a minus sign, or any of a hundred different mistakes can cause the code to fail, or worse produce the wrong
answer. A simple way to eliminate many of these mistakes is to run simple scenarios that have perfectly symmetric initial and boundary conditions.
For example, put a hot cube in the exact center of a larger cold compartment, turn off gravity, and watch the heat diffuse from the hot cube into the
cold gas. Any simple error in the coding of the energy equation will show up almost immediately. Then, turn on gravity, and in the absence of any
coding error, a perfectly symmetric plume will rise from the hot cube. This checks both the coding of the energy and the momentum equations. Similar
checks can be made for all of the three dimensional finite difference routines. So extensive are these types of checks that the release version of
FDS has a routine that generates a tiny amount of random noise in the initial flow field so as to eliminate any false symmetries that might arise in
the numerical solution.

The process of adding new routines to FDS is as follows: typically the routine is written by one person who takes
the latest version of the source code, adds the new routine, and writes a theoretical and numerical description for the FDS Technical Reference
Guide, plus a description of the input parameters for the FDS User's Guide. The new version of FDS is then tested with a number of benchmark
scenarios that exercise the range of the new parameters.  Provisional acceptance of the new routine is based on several factors: (1) it produces more
accurate results when compared to experimental measurement, (2) the theoretical description is sound, and (3) any empirical parameters are obtainable
from the open literature or standard bench-scale apparatus.  If the new routine is accepted, it is added to the working version of the software and
evaluated by running the standard verification and validation test cases. Assuming that there are no intractable issues that arise
during the testing period, the new routine eventually becomes part of the release version of FDS.

Even with all the code checking, it is still possible for errors to go unnoticed. One remedy is the fact that the source code for
FDS is publicly released. Although it consists of on the order of 100,000 lines of Fortran statements, various independent researchers have been
able to work with it, add enhancements needed for very specific applications or for research purposes, and report back to the developers bugs that
have been detected. The source code is organized into 27 separate files, each containing subroutines related to a particular feature of the model,
like the mass, momentum, and energy conservation equations, sprinkler activation and sprays, the pressure solver, etc. The lengthiest routines
are devoted to input, output and initialization.  Most of those working with the source code do not concern themselves with these lengthy routines
but rather focus on the finite-difference algorithm contained in a few of the more important files. Most serious errors are found in these files, for
they contain the core of the algorithm. The external researchers provide feedback on the organization of the code and its internal documentation,
that is, comments within the source code itself.  Plus, they must compile the code on their own computers, adding to its portability.



\chapter{The Basic Flow Solver}


In this chapter we present test cases aimed at exercising the advective, pressure, and viscous terms, as well as the time integration for non-reacting flows.


\section{Analytical Solution to the Navier-Stokes Equation (\texorpdfstring{\textct{ns2d}}{ns2d})}
\label{ns2d}
\label{ns2d_64_nupt1}

In this section we present an analytical solution that is useful for confirming the convergence rates of the truncation errors in the discretization of the terms in
the governing equations. Consider the 2D incompressible Navier-Stokes equations
\begin{equation}
\label{eqn_NS}
\frac{\partial \mathbf{u}}{\partial t} + \mathbf{u} \cdot \nabla \mathbf{u} = - \nabla{p} + \nu \nabla^2 \mathbf{u} \,\mbox{,}
\end{equation}
where the velocity is given by $\mathbf{u} = [u, w]^T$, and the kinematic viscosity and pressure are denoted $\nu$ and $p$, respectively.
An analytical solution of these equations is given by \cite{McDermott:NS2D}
\begin{eqnarray}
\label{eqn_usoln}
u(x,z,t) &=& 1 - A\cos(x-t)\sin(z-t)\,{\rm e}^{-2\nu\, t} \,\mbox{,} \\
w(x,z,t) &=& 1 + A\sin(x-t)\cos(z-t)\,{\rm e}^{-2\nu\, t} \,\mbox{,}
\end{eqnarray}
\begin{equation}
p(x,z,t) = -\frac{A^2}{4} \left[ \cos(2(x-t))+\cos(2(z-t))\right]{\rm e}^{-4\nu\, t} \,\mbox{.}
\end{equation}
Here, $A$ represents an arbitrary amplitude and is assumed to take a value of 2 in this example.
Note that this solution satisfies continuity for all time,
\begin{equation}
\label{eqn_divfree}
\nabla\cdot\mathbf{u} = 0 \,\mbox{,}
\end{equation}
is spatially periodic on an interval $2\pi$ in each direction, and is temporally periodic on $2\pi$ if $\nu=0$; otherwise, the solution decays exponentially.
Below we present two series of tests which demonstrate the second-order accuracy of the FDS numerical scheme and thus provide a strong form of code verification
for the advective and viscous terms which are exercised.

The physical domain of the problem is a square of side $L=2\pi$.  The grid spacing is uniform $\delta x = \delta z = L/N$ in each direction
with $N =\{8,16,32,64\}$ for each test series.  The staggered grid locations are denoted $x_i = i \, \delta x$ and $z_k = k \, \delta z$, and the cell
centers are marked by an overbar, $\bar{x}_i = x_i - \delta x/2$ and $\bar{z}_k = z_k - \delta z/2$.

First, we present qualitative results for the case in which $\nu=0$.  Thus, only the advective discretization and the time integration are being tested.
Figure \ref{fig_ns2d_smv} shows the initial and final $(t=2\pi)$ numerical solution for the case $N=64$.
As mentioned, with $\nu=0$ the solution is periodic in time and this figure demonstrates that, as should be the case, the FDS numerical solution is unaltered after one flow-through time.

\begin{figure}[!ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_64_start} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_64_end} }
   \end{tabular*}
   \caption[Initial and final states of Navier-Stokes solution]{Initial and final states of the $u$-component of velocity.}
   \label{fig_ns2d_smv}
\end{figure}

Next, in Fig.~\ref{fig_ns2d_timehistory}, we show time histories of the $u$-component of velocity at the center of the domain for the case in which $\nu = 0.1$.
It is clearly seen that the FDS solution (dashed line) converges to the analytical solution (solid line).
Note that the analytical solution is evaluated at the same location as the FDS staggered grid location for the $u$-component
of velocity, $(x_{N/2},\bar{z}_{N/2})$, which is different in each case, $N =\{8,16,32,64\}$.

\begin{figure}[!ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_8_nupt1} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_16_nupt1} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_32_nupt1} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_64_nupt1} }
   \end{tabular*}
   \caption[Velocity time history, qualitative convergence]{Time history of the $u$-component of velocity half a grid cell below the center of the domain for a range of grid resolutions.
   The domain is a square of side $L = 2\pi$ m.  The $N \times N$ grid is uniform.  Progressing from left to right and top to bottom we have resolutions $N =\{8,16,32,64\}$
   clearly showing convergence of the FDS numerical solution (dashed line) to the analytical solution (solid line).
   The case is run with constant properties, $\rho=1$ \si{kg/m^3} and $\mu = 0.1$ kg/m/s, and a Courant-Friedrichs-Lewy (CFL) of 0.25.}
   \label{fig_ns2d_timehistory}
\end{figure}

Figure \ref{fig_ns2d_convergence} is the key quantitative result of this verification test.  In this figure we plot the rms error, $\varepsilon_{\mbox{\scriptsize rms}}$,
in the $u$-component of velocity against the grid spacing.  The error is defined by
\begin{equation}
\label{eqn_rmserror}
\varepsilon_{\mbox{\scriptsize rms}} \equiv \sqrt{ \frac{1}{M} \sum_{m=1}^{M} \left[ U_{ij}^m - u(x_i,\bar{z}_k,t_m) \right]^2 } \,\mbox{,}
\end{equation}
where $M$ is the number of time steps and $k$ is the time step index.  The spatial indices are $(i=N/2,k=N/2)$ and $U_{ij}^k$ represents the FDS value for the $u$-component of
velocity at the staggered storage location for cell $(i,j)$ at time step $m$; $u(x_i,\bar{z}_k,t_m)$ is the analytical solution for the $u$-component at
the corresponding location in space and time.  The figure confirms that the advective terms, the viscous terms, and the time integration in the FDS code are convergent and second-order accurate.

\begin{figure}[!ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_error} } &
      \scalebox{1}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/ns2d_nupt1_error} }
   \end{tabular*}
   \caption[Navier-Stokes convergence study]{(Left) Convergence rate for the $u$-component of velocity with $\nu = 0$ showing that the advective terms in the FDS code are second-order accurate.  The asterisks represent the RMS error in the $u$-component for grid spacings of $\delta x = L/N$ where $L = 2\pi$ m and $N = \{8,16,32,64\}$. The solid line represents first-order accuracy and the dashed line represents second-order accuracy. The simulation is run to a time of $t = 2\pi$~s with a CFL of $0.25$.  The $u$-component at the center of the domain is compared with the analytical solution at the same location.  (Right) Same case, except $\nu=0.1$, showing that the viscous terms in the FDS code are second-order accurate.}
   \label{fig_ns2d_convergence}
\end{figure}


\section{Analytical Solution to the Continuity Equation}

Analytical solutions for primitive flow variables (density, velocity, pressure, etc.) are useful in the development and testing of numerical schemes for CFD.  For example, an analytical solution to the 2D incompressible Navier-Stokes (NS) equations is presented in Section \ref{ns2d} and is used to verify the spatial and temporal accuracy of momentum equation.

The aim of the present work is to develop analytical solutions for the compressible NS equations that can be used for verification of both compressible and variable-density low-Mach flow solvers.  The main idea is that, given a specified velocity field, the continuity equation can be rearranged into a linear hyperbolic PDE for the logarithm of the density.  Let $\rho$ denote the density and let $\mathbf{u} = [u,v]^T$ denote the velocity. The continuity equation (conservation of mass) can then be written as
\begin{equation}
\label{eqn_continuity}
\frac{\partial \ln \rho}{\partial t} + \mathbf{u} \cdot \nabla \ln \rho + \nabla\cdot \mathbf{u} = 0 \,\mbox{.}
\end{equation}
Further, for certain simple specifications of the velocity this PDE can be solved using the method of characteristics.

In what follows we present 1D and 2D solutions to (\ref{eqn_continuity}) for two basic irrotational flow fields.  All the solutions are periodic in space.  The first configuration is a pulsating flow that cycles between compressing the fluid toward the center and then the corners of the domain.  In the second configuration, time periodicity is achieved by using a constant and uniform advection velocity in combination with the compression waves.  This results in a solution with a qualitatively different character than the first.

\subsection{Pulsating 1D solution}
\label{soln_1d}

We specify the velocity as
\begin{equation}
\label{eqn_velocity1d}
u(x,t)  = B \sin(x) \cos(\omega t) \,\mbox{,}
\end{equation}
where $B$ is a constant amplitude and $\omega$ is the frequency of the compression cycle. The velocity divergence in 1D is then
\begin{equation}
\label{eqn_pdesource1d}
\frac{\partial u}{\partial x} = B \cos(x) \cos(\omega t) \,\mbox{.}
\end{equation}

Let $q \equiv \ln \rho$ (this notation is used throughout this work).  The 1D continuity equation can then be written as the following linear hyperbolic PDE:
\begin{equation}
\label{eqn_cont1d}
\frac{\partial q}{\partial t} + B \sin(x) \cos(\omega t) \frac{\partial q}{\partial x} + B \cos(x) \cos(\omega t) = 0 \,\mbox{,}
\end{equation}
which can be solved using the method of characteristics to obtain the solution
\begin{equation}
\label{eqn_1dsoln}
q(x,t) = q(x_0[x,t],0) + \ln \left\{ \frac{ 1 + \tan^2\left(\frac{x_0[x,t]}{2}\right) \exp\left(\frac{2B}{\omega}\sin[\omega t]\right) }{ 1 + \tan^2\left(\frac{x_0[x,t]}{2}\right) } \right\} - \frac{B}{\omega} \sin(\omega t) \,\mbox{,}
\end{equation}
where the initial position is given by
\begin{equation}
\label{eqn_initialposition1d}
x_0(x,t) = 2 \arctan\left( \tan\left[\frac{x}{2}\right] \exp\left[-\frac{B}{\omega}\sin(\omega t)\right] \right) \,\mbox{.}
\end{equation}
Note that we have taken the initial time to be zero, as is done throughout this work.


\subsection{Pulsating 2D solution (\texorpdfstring{\textct{pulsating}}{pulsating})}
\label{soln_2d}

There is a simple extension of the 1D stationary wave solution to 2D. In this section we consider the velocity field $\mathbf{u}=[u,v]^T$ with components and velocity divergence given by
\begin{eqnarray}
\label{eqn_u2d}
u(x,t) &=& B \sin(x) \cos(\omega t) \,\mbox{,} \vspace{0.2cm}\\
v(y,t) &=& B \sin(y) \cos(\omega t) \,\mbox{,}
\end{eqnarray}
\begin{equation}
\label{eqn_div2d}
\nabla\cdot\mathbf{u} = B(\cos[x] + \cos[y]) \cos(\omega t) \,\mbox{,}
\end{equation}
where, again, $B$ is a constant amplitude and $\omega$ is the compression frequency.  The 2D continuity equation may then be written as
\begin{equation}
\label{eqn_cont2d}
\frac{\partial q}{\partial t} + B \sin(x) \cos(\omega t) \frac{\partial q}{\partial x} + B \sin(y) \cos(\omega t) \frac{\partial q}{\partial y} + B( \cos[x] + \cos[y]) \cos(\omega t) = 0 \,\mbox{,}
\end{equation}
where, again, $q \equiv \ln \rho(\mathbf{x},t)$.

The solution to (\ref{eqn_cont2d}) can be obtained by adding the solutions of the following two PDEs:
\begin{eqnarray}
\label{eqn_linearpdes}
\frac{\partial q_1}{\partial t} + B \sin(x) \cos(\omega t) \frac{\partial q_1}{\partial x} + B \cos(x) \cos(\omega t) &=& 0 \,\mbox{,} \vspace{0.3cm} \\
\frac{\partial q_2}{\partial t} + B \sin(y) \cos(\omega t) \frac{\partial q_2}{\partial y} + B \cos(y) \cos(\omega t) &=& 0 \,\mbox{.}
\end{eqnarray}
Thus, utilizing (\ref{eqn_1dsoln}) and (\ref{eqn_initialposition1d}), and replacing $q_1(x_0[x,t],0) + q_2(y_0[y,t],0)$ with $q_0(x,y,t)$, we find that the solution to (\ref{eqn_cont2d}) is
\begin{eqnarray}
\label{eqn_2dsoln}
q(x,y,t) &=& q_0(x,y,t) \nonumber\vspace{0.3cm}\\
&+& \ln \left\{ \frac{1 + a(x_0[x,t]) \exp \left( \frac{2B}{\omega} \sin[\omega t] \right)}{1 + a(x_0[x,t])} \right\} \nonumber\vspace{0.3cm}\\
&+& \ln \left\{ \frac{1 + a(y_0[y,t]) \exp \left( \frac{2B}{\omega} \sin[\omega t] \right)}{1 + a(y_0[y,t])} \right\} \nonumber\vspace{0.3cm}\\
&-& \frac{2B}{\omega} \sin(\omega t) \,\mbox{,}
\end{eqnarray}
where
\begin{equation}
\label{eqn_a}
a(z) \equiv \tan^2\left(\frac{z}{2}\right) \,\mbox{,}
\end{equation}
and the initial positions are given by
\begin{eqnarray}
\label{eqn_initpos2d}
x_0(x,t) &=& 2 \arctan\left( \tan\left[\frac{x}{2}\right] \exp\left[-\frac{B}{\omega}\sin(\omega t)\right] \right) \,\mbox{,} \vspace{0.3cm}\\
y_0(y,t) &=& 2 \arctan\left( \tan\left[\frac{y}{2}\right] \exp\left[-\frac{B}{\omega}\sin(\omega t)\right] \right) \,\mbox{.}
\end{eqnarray}
Note that the initial condition $q_0(x,y,t)$ is restricted to cases where $\frac{\partial q_0}{\partial x}$ is independent of $y$ and $\frac{\partial q_0}{\partial y}$ is independent of $x$.  That is, the function $q_0$ must be \emph{additively separable}.

An example of the solution to (\ref{eqn_2dsoln}) is shown in Fig.~\ref{fig_pulsating 2D wave}. The initial condition for the density is specified as $\rho(\mathbf{x},0) = 1$ and the amplitude and frequency are set to unity, $B=1$ and $\omega=1$.  FDS is run with three scalar transport schemes: central differencing, Superbee, and the CHARM flux limiter. The solution at $(x,y) = (3\pi/2, 3\pi/2)$ for successively finer grid resolutions is plotted as a time series on the left and may be compared with the analytical solution (black line). On the right, we confirm second-order convergence for the FDS implementation.  Central differencing and the CHARM limiter outperform Superbee for this problem because the solution is relatively smooth.

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/pulsating_time_series} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/pulsating_convergence}
   \end{tabular*}
   \caption[Pulsating wave convergence]{(Left) Time series of $\rho$ at the position $(x,y) = (3\pi/2, 3\pi/2)$ for several grid resolutions using the Superbee limiter. (Right) Convergence plot for central differencing, Superbee, and CHARM.  All schemes are second-order accurate.}
   \label{fig_pulsating 2D wave}
\end{figure}

\subsection{Stationary compression wave in 1D}
\label{stationary_1d}

Another problem which can be solved analytically is that of a stationary compression wave.  In this section we consider a stationary compression wave combined with a constant and uniform advection velocity in 1D.  The velocity is specified to be
\begin{equation}
\label{eqn_statu1d}
u(x) = c + \sin(x) \,\mbox{,}
\end{equation}
where $|c|>1$ is a constant.  The 1D continuity equation becomes
\begin{equation}
\label{eqn_stat1dcont}
\frac{\partial q}{\partial t} + [c + \sin(x)] \frac{\partial q}{\partial x} + \cos(x) = 0 \,\mbox{.}
\end{equation}
A solution to (\ref{eqn_stat1dcont}) is
\begin{eqnarray}
\label{eqn_stat1dsoln}
q(x,t) &=& q(x_0[x,t],0) \nonumber \vspace{0.3cm}\\
&+& \ln\left\{ -c^2 - \cos\big(bt + 2\arctan[\gamma(x,t)] \big) + b\sin\big(bt + 2\arctan[\gamma(x,t)] \big) \right\} \nonumber \vspace{0.3cm}\\
&-& \ln\left\{ -c^2 - \cos\big( 2\arctan[\gamma(x,t)] \big) + b\sin\big( 2\arctan[\gamma(x,t)] \big) \right\} \,\mbox{,}
\end{eqnarray}
where
\begin{equation}
\label{eqn_b}
b \equiv \sqrt{-1 + c^2} > 0 \,\mbox{,}
\end{equation}
\begin{equation}
\label{eqn_gamma}
\gamma(x,t) = \frac{ 1 + c\tan\left( \frac{x_0[x,t]}{2} \right) }{b} \,\mbox{,}
\end{equation}
and
\begin{equation}
\label{eqn_stat1dx0}
x_0(x,t) = 2\arctan\left( \frac{b}{c} \tan \left[ \arctan\left\{ \frac{1+c\tan[x/2]}{b} \right\} - \frac{bt}{2} \right] - \frac{1}{c} \right) \,\mbox{.}
\end{equation}

\subsection{Stationary compression wave in 2D (\texorpdfstring{\textct{compression\_wave}}{compression\_wave})}
\label{stationary_2d}

As with the pulsating flow, there is a simple extension of the 1D stationary wave solution to 2D.  In this section we consider the velocity field with components
\begin{eqnarray}
u(x) &=& c_1 + \sin(x) \,\mbox{,} \\
v(y) &=& c_2 + \sin(y) \,\mbox{.}
\end{eqnarray}
The continuity equation can be written as
\begin{equation}
\label{eqn_stat2d_cont}
\frac{\partial q}{\partial t} + [c_1 + \sin(x)] \frac{\partial q}{\partial x} + [c_2 + \sin(y)] \frac{\partial q}{\partial y} + \cos(x) + \cos(y) = 0 \,\mbox{.}
\end{equation}
A solution to (\ref{eqn_stat2d_cont}) is
\begin{eqnarray}
\label{eqn_stat2d_soln}
q(x,y,t) &=& q_0(x,y,t) \nonumber\\
&+& \mathcal{I}_1(x,t) - \mathcal{I}_1^0(x,t) \nonumber\\
&+& \mathcal{I}_2(y,t) - \mathcal{I}_2^0(y,t) \,\mbox{,}
\end{eqnarray}
where
\begin{eqnarray}
\label{eqn_Ii}
\mathcal{I}_i(z,t) &=& \ln\left\{ -c_i^2 - \cos\big(b_i t + 2\arctan[\gamma_i(z,t)] \big) + b_i \sin\big(b_i t + 2\arctan[\gamma_i(z,t)] \big) \right\}\,\mbox{,} \quad\quad  \vspace{0.3cm}\\
\label{eqn_Ii0}
\mathcal{I}_i^0(z,t) &=& \ln\left\{ -c_i^2 - \cos\big(2\arctan[\gamma_i(z,t)] \big) + b_i \sin\big(2\arctan[\gamma_i(z,t)] \big) \right\} \,\mbox{,}
\end{eqnarray}
and
\begin{equation}
b_i \equiv \sqrt{-1 + c_i^2} >0 \,\mbox{,}
\end{equation}
\begin{equation}
\gamma_i(z,t) = \frac{ 1 + c_i \tan\left( \frac{z_0[z,t]}{2} \right) }{b_i} \,\mbox{,}
\end{equation}
\begin{equation}
z_0(z,t) = 2\arctan\left( \frac{b_i}{c_i} \tan \left[ \arctan\left\{ \frac{1+c_i\tan[z/2]}{b_i} \right\} - \frac{b_it}{2} \right] - \frac{1}{c_i} \right) \,\mbox{.}
\end{equation}
Note that $z_0 \Rightarrow x_0$ for $i=1$ and $z_0 \Rightarrow y_0$ for $i=2$.  To be clear, no summation is implied over repeated indices. Also, note that the same restrictions apply to the initial condition as did in Section \ref{soln_2d}. Namely, that $\frac{\partial q_0}{\partial x}$ is independent of $y$ and $\frac{\partial q_0}{\partial y}$ is independent of $x$.

An example of the solution to (\ref{eqn_stat2d_soln}) is shown in Fig.~\ref{fig_compression_wave}.  In this case we set $c_1 = 2$ and $c_2 = 3$ to create an asymmetry in the flow.  The periodicity in time depends on the choices of $c_1$ and $c_2$; it is possible that no periodicity exists. We have not found a case that generates a singularity. The analytical time series of the density at the position $(x,y) = (3\pi/2, 3\pi/2)$ is shown as the solid black line. FDS is run with the CHARM flux limiter scheme (as this is a DNS flow field).  The solution at successively finer grid resolutions is plotted and compared with the analytical solution, demonstrating convergence of the scheme.  On the right side of the figure we demonstrate second-order convergence of the central, Superbee, and CHARM limiter schemes in FDS.

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/compression_wave_time_series} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/compression_wave_convergence}
   \end{tabular*}
   \caption[Stationary compression wave convergence]{(Left) Time series of $\rho$ at the position $(x,y) = (3\pi/2, 3\pi/2)$ for several grid resolutions using the CHARM flux limiter. (Right) Convergence plot for three different scalar transport schemes in FDS: central, Superbee, and CHARM.  All schemes are second-order accurate.  In addition, notice that Superbee gives the lowest error at the coarsest resolution while CHARM gives the lowest error at higher resolution.  This is one reason why Superbee is recommended for VLES and CHARM is the default for LES and DNS.}
   \label{fig_compression_wave}
\end{figure}

\section{Scalar Transport}

\subsection{Uniform Velocity Field (\texorpdfstring{\textct{move\_slug}}{move\_slug})}

In this section we demonstrate the qualitative behavior of the Superbee flux limiter scheme for transport of a square wave.
The diffusivity is set to zero and the advecting velocity is constant and uniform $\mathbf{u} = [1.0\,\,\,1.0]$.
The domain is the unit square with a passive scalar marker initialized to zero everywhere, except for two `slugs' of mass.
The first slug is set to unity over the region $x \times z = [0.125,\,0.375] \times [0.125,\,0.375]$.
The second slug is set to 1/2 over the region $x \times z = [0.500,\,0.750] \times [0.500,\,0.750]$.
With the scalar bounds set to [0,1], these slugs demonstrate both the boundedness and TVD (total variation diminishing) behavior of the transport scheme.

This case also tests two different types of boundary conditions applied in FDS.  First, the domain is periodic and the simulation runs for one flow through time. The scalar slugs therefore ideally arrive back to their original locations with as little diffusion as possible.
Also, the domain is broken into four equally sized meshes, each with $40 \times 40$ uniform cells. To increase temporal accuracy and focus on the potential spacial error, we run the case with a CFL of 0.25.  In FDS, we refer to the mesh interface as an `interpolated boundary'.

The results of the test are shown visually in Fig.~\ref{fig_move_slug}.  The upper-left image shows the initial condition.
The black lines indicate the mesh interfaces.  To the right of the initial condition we show the first slug crossing the mesh interfaces without incurring spurious noise. The lower left image shows the final result for the Superbee limiter.  By comparison with a first-order scheme (lower right), this test case confirms that relatively low levels of diffusion are incurred at both periodic and interpolated boundaries in FDS.

\begin{figure}[p]
   \begin{tabular}{rl}
      \includegraphics[width=3in]{SCRIPT_FIGURES/move_slug_FL2_t0} &
      \includegraphics[width=3in]{SCRIPT_FIGURES/move_slug_FL2_tm} \\
      \includegraphics[width=3in]{SCRIPT_FIGURES/move_slug_FL2_tf} &
      \includegraphics[width=3in]{SCRIPT_FIGURES/move_slug_FL1_tf} \\
   \end{tabular}
   \caption[Multi-mesh square wave transport]{(Upper left) Initial condition. (Upper right) Superbee solution after 0.175 seconds showing the scalar slug cleanly passing through the mesh interface. (Lower left) Final result for Superbee after one flow through time.  (Lower right) Result for first-order upwinding after one flow through time, illustrating the relatively low dissipation of the Superbee scheme.  Note that, though the first-order scheme is available as an option in FDS, it is presented here for comparison purposes only.  In practice, the higher order Superbee scheme is preferred for VLES (FDS default).}
   \label{fig_move_slug}
\end{figure}

\newpage

\clearpage

\subsection{Solid Body Rotation Velocity Field (\texorpdfstring{\textct{soborot}}{soborot})}
\label{sec:soborot_error}

In this series of tests, the velocity field is a simple solid-body rotation about the origin.  The field is given by
\begin{align}
u &= z \\
w & = -x
\end{align}

The domain is a unit square with the origin at the lower-right.  Two wave forms are examined.  The first is a simple square wave with a passive scalar introduced at the $z=0$ boundary plane with a mass fraction value of $1$ for $0.25 \le r \le 0.75$, where $r$ is the radial position from the origin.  The second is a section of a compressed cosine wave with the phase shifted so that the minimum aligns with the start and end of the square wave.  The initial condition is given by $\frac{1}{2}(1 + \cos(4\pi r))$ for $0.25 \le r \le 0.75$.  The velocity field is held fixed.  The scalar fields are evolved for $\pi/2$ s (1/4 rotation).  The scalar concentration is measured along the upper-left diagonal as shown in Fig.~\ref{fig_soborot_images}.  The constant velocity field is shown on the left and the solution of the square wave for the CHARM scheme at $\delta x = 1/64$ m is shown on the right.

\begin{figure}[ht]{}
   \begin{tabular}{rl}
      \includegraphics[width=3in]{SCRIPT_FIGURES/soborot_charm_square_wave_vectors} &
      \includegraphics[width=3in]{SCRIPT_FIGURES/soborot_charm_square_wave_tracer} \\
   \end{tabular}
   \caption[Solid body rotation scalar transport]{(Left) Solid body rotation velocity field. (Right) Tracer concentration at time $\pi/2$ (1/4 rotation).}
   \label{fig_soborot_images}
\end{figure}

The steady state analytical solution to this problem is that the scalar field remains constant as a function of radius from the origin.  In Fig.~\ref{fig_soborot_square_wave} we plot the L2 Error for Godunov, CHARM, and Superbee flux limiter schemes for the square wave initial condition.  As shown in \cite{Leveque:1}, the Godunov scheme shows ${\cal O}(\delta x^{1/2})$ convergence for this discontinuous solution.  Other schemes have smaller initial errors, but also ultimately converge at the same rate for this problem.

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_godunov_square_wave} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_charm_square_wave}   \\
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_superbee_square_wave} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_square_wave_error}
   \end{tabular*}
   \caption[Solid body rotation square wave convergence]{Solid body rotation square wave solution convergence.  Scalar fields along upper-left diagonal for Godunov (upper-left), CHARM (upper-right), and Superbee (lower-left).  (Lower-right) L2 Error.}
   \label{fig_soborot_square_wave}
\end{figure}

For the consine wave intial condition the derivatives of the scalar field are continuous.  Therefore, we see ${\cal O}(\delta x^2)$ convergence of the CHARM and MP5 schemes, as shown in Fig.~\ref{fig_soborot_cos_wave}.  Superbee shows smaller error at coarse resolution, but the gradient steepening degenerates its accuracy at higher resolutions---hence CHARM is selected for LES and DNS.

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_superbee_cos_wave} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_charm_cos_wave}   \\
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_mp5_cos_wave} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/soborot_cos_wave_error}
   \end{tabular*}
   \caption[Solid body rotation cosine wave convergence]{Solid body rotation cosine wave solution convergence.  Scalar fields along upper-left diagonal for Superbee (upper-left), CHARM (upper-right), and MP5 (lower-left).  (Lower-right) L2 Error.}
   \label{fig_soborot_cos_wave}
\end{figure}

\section{Temporal Error Analysis for a Variable-Density Projection (\texorpdfstring{\textct{saad}}{saad})}
\label{sec:saad_temporal_error}

\textbf{Tony Saad and James Sutherland, The University of Utah}\\

\noindent This is a 1D variable-density benchmark solution for an inviscid, non-reacting mixture of two fluids with different densities (10:1 ratio) in a plug-flow system \cite{Biglari:2013}.  The diffusivity is set to zero.  The governing equations for the mixture fraction, $Z$, and the $x$ component of momentum, $u$, are
\begin{equation}
\frac{\partial Z}{\partial t} = - u\frac{\partial Z}{\partial x} \,\mbox{,}
\end{equation}
\begin{equation}
\frac{\partial u}{\partial t} = - u\frac{\partial u}{\partial x} - \frac{1}{\rho} \frac{\partial \tilde{p}}{\partial x} \,\mbox{.}
\end{equation}
The equation of state gives the following relationship between the mixture fraction and the density:
\begin{align}
\frac{1}{\rho} &= \frac{(1-Z)}{\rho_0} + \frac{Z}{\rho_1} \,\mbox{.}
\end{align}

The FDS input files may be found in\\
{\ct /Verification/Scalar\_Analytical\_Solution/saad\_512\_cfl*.fds}.\\

\noindent The densities are set to $\rho_0 = 0.5$ \si{kg/m^3} and $\rho_1 = 5$ \si{kg/m^3}, respectively.  The initial field for $Z$ is specified as a sine wave on a 1D domain of length $L=2$ m (see Fig.~\ref{fig:saad_temporal_order} below).
\begin{align}
Z(x,0) = \frac{1}{2}\left( 1 + \sin(2\pi x/L) \right)
\end{align}
All cases are run with $N_x = 512$ grid points.  The effect of the spatial error is discussed below. The velocity field is initialized to $u(x,0) = U_0 = 1$ m/s, which is the analytical solution for the velocity for all time, $u(x,t) = U_0$.  Note, however, that the velocity field is not ``frozen'' in the calculations, it is subject to variation by the projection scheme (if we are doing things correctly, then the velocity will not change).  The analytical solution for the mixture fraction is given by a characteristic solution:
\begin{align}
Z(x,t) = Z_0(x-U_0 t) \,\mbox{.}
\end{align}

\paragraph{Computing Temporal Order without an Analytical Solution}

Despite having an analytical solution for this case, it is difficult to use this solution to assess the temporal error in the time integration scheme alone.  This is because the spatial errors will typically dominate for an explicit scheme.  To overcome this, we use a method based on Richardson extrapolation (see, e.g., Moin \cite{Moin:2001}).  The idea is to expand a quantity $f$ in a Taylor series with different time increments with a constant ratio $r = \frac{\Delta t_{fine}}{\Delta t_{coarse}} < 1$.
\begin{align}
f_1 &= f_0 + a_0 \Delta t^p + \mathcal{O}(\Delta t^{p+1}) \\
f_2 &= f_0 + a_0 (r \Delta t)^p + \mathcal{O}(r^{p+1} \Delta t^{p+1}) \\
f_3 &= f_0 + a_0 (r^2 \Delta t)^p + \mathcal{O}(r^{2p+2} \Delta t^{p+1})
\end{align}
The temporal order of accuracy is given by $p$, which may be written as
\begin{equation}
\label{eq:temporal_order}
p = \frac{\ln \left(\frac{f_3-f_2}{f_2-f_1}\right)}{\ln r}
\end{equation}
This procedure effectively filters out the spatial error.  It is, in fact, possible to run this case with a first-order spatial scheme (e.g., Godunov) and still see second-order temporal convergence.

\paragraph{Temporal Order Results} The {\ct saad*.fds} cases are run with three different time steps, each refined by a factor of 2, and integrated to a total time $T=0.390625$ s.  This time represents 100 time steps for a case with CFL = 1.  To assess the asymptotic temporal order from Eq.~(\ref{eq:temporal_order}), we use the three finest time steps corresponding to CFL = [0.25, 0.125, 0.0625] for the solutions [$f_1$, $f_2$, $f_3$], respectively.

The results are shown in Fig.~\ref{fig:saad_temporal_order}.  At the top of the figure you can see the initial and final fields for the mixture fraction and density for the finest time step.  Both fields have been advected to the right.  In the lower-left we plot the numerator and denominator in Eq.~(\ref{eq:temporal_order}) for the density solution.  On the bottom-right we show the order $p$ computed pointwise on the 1D domain. The deviations from second-order behavior correspond to degenerate in the formula for $p$ (as shown in the lower-left plot) where either the denominator is near zero ($p$ spikes up) or the numerator and denominator cross (thus $p=0$).  The $l_2$ norm of $p$ computed pointwise is \input{SCRIPT_FIGURES/saad_l2_norm}\!.  Note that the $l_\infty$ norm (computed pointwise) is degenerate for the reasons just discussed.  A method to overcome this issue is discussed in Sec.~\ref{sec:shunn_mms}.

\begin{figure}[ht]
\centering
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/saad_Z}
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/saad_rho}
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/saad_rho_diff}
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/saad_temporal_order_rho}
\caption[The {\ct saad} temporal order test case]{Temporal order for a variable-density projection.  (Upper-left) Initial and final field for mixture fraction.  (Upper-right) Initial and final field for density.  (Lower-left) Plot of numerator and denominator in Eq.~(\ref{eq:temporal_order}) for density at final time. (Lower-right) Plot of $p$ computed pointwise from Eq.~(\ref{eq:temporal_order}).  Fluctuations are due to degenerate points in the formula for $p$.  The temporal order is $p$ = \input{SCRIPT_FIGURES/saad_l2_norm}\!.}
\label{fig:saad_temporal_order}
\end{figure}

\section{Variable-Density Manufactured Solution (\texorpdfstring{\textct{shunn3}}{shunn3})}
\label{sec:shunn_mms}

To demonstrate second-order accuracy of the FDS time-marching algorithm, here we present numerical results for the manufactured solution proposed by Shunn et al.~\cite{Shunn:2012} (with a modified pressure solution). The parameters for this problem are given in Table~\ref{tab_shunn_params}.  In the 2D sinusoidal solution given below, $Z$ is the mixture fraction, $\rho$ is the density, $u$ and $v$ are velocity components, and $H$ is the Bernoulli integral ($H \equiv \tilde{p}/\rho + \frac{1}{2}|\mathbf{u}|^2$ where $\tilde{p}$ is the hydrodynamic pressure).  The solution translates diagonally across the domain with velocity $[u_f, v_f]$.  The translated positions are define by $\hat{x} \equiv x- u_f t$ and $\hat{y} \equiv y - v_f t$. The solution is spatially periodic on a square domain extending from $-1$ m to 1 m ($L=2$ m) on each side and has a time period of 1 s.

\begin{table}[!hbt]
\centering
\caption[Parameters for manufactured solution]{Parameters for Shunn et al.~\cite{Shunn:2012} manufactured solution.}
\label{tab_shunn_params}
\begin{tabular*}{.5\textwidth}{l@{\extracolsep{1.5cm}}ll}
Parameter & Value & Units\\
\hline
$\rho_0$  & 5 & \si{kg/m^3} \\
$\rho_1$  & 1 & \si{kg/m^3}\\
$k=\omega$ & 2 & \si{1/m}, \si{1/s}\\
$u_f = v_f$ & 0.5 & \si{m/s} \\
$\rho D = \mu$ & 0.001 & \si{kg/(m.s)}
\end{tabular*}
\end{table}

\begin{align}
\label{eqn_mms_z} Z(x,y,t) &= \frac{1 + \sin(\pi k \hat{x}) \sin(\pi k \hat{y}) \cos(\pi \omega t)}{(1 + \frac{\rho_0}{\rho_1}) + (1 - \frac{\rho_0}{\rho_1}) \sin(\pi k \hat{x}) \sin(\pi k \hat{y}) \cos(\pi \omega t)} \\
\label{eqn_mms_rho} \rho(x,y,t) &= \left( \frac{Z(x,y,t)}{\rho_1} + \frac{1-Z(x,y,t)}{\rho_0} \right)^{-1} \\
\label{eqn_mms_u} u(x,y,t) &= u_f + \frac{\rho_1 - \rho_0}{\rho(x,y,t)} \left(\frac{-\omega}{4 k}\right) \cos(\pi k \hat{x}) \sin(\pi k \hat{y}) \sin(\pi \omega t) \\
\label{eqn_mms_v} v(x,y,t) &= v_f + \frac{\rho_1 - \rho_0}{\rho(x,y,t)} \left(\frac{-\omega}{4 k}\right) \sin(\pi k \hat{x}) \cos(\pi k \hat{y}) \sin(\pi \omega t) \\
\label{eqn_mms_p} H(x,y,t) &= \frac{1}{2} ( u(x,y,t) - u_f ) ( v(x,y,t) - v_f )
\end{align}

%Note that (\ref{eqn_mms_rho}) is the equation of state (EOS) and may be rearranged for this simple problem to give $Z$ in terms of $\rho$,
%\begin{equation}
%\label{eqn_mms_eos}
%Z = \frac{(\rho_0 - \rho) \rho_1}{(\rho_0 - \rho_1) \rho} \,\mbox{.}
%\end{equation}

The source terms for the manufactured solution, $\dot{Q}_\rho$, etc., are defined as the residuals of the transport equations:
\begin{align}
\label{eqn_mms_continuity} \frac{\partial \rho}{\partial t} + \Div(\rho \mathbf{u}) &= \dot{Q}_\rho \,\mbox{,}\\
\frac{\partial (\rho Z)}{\partial t} + \Div(\rho Z \mathbf{u}) - \Div\left(\rho D \nabla Z\right) &= \dot{Q}_Z \,\mbox{,}\\
\frac{\partial \mathbf{u}}{\partial t} - \mathbf{u} \times (\nabla \times \mathbf{u}) + \nabla H - \tilde{p} \nabla(1/\rho) - \frac{1}{\rho}\Div{\sf T} &= \dot{Q}_{\mathbf{u}} \,\mbox{,}
\end{align}
where the components of the deviatoric stress tensor, ${\sf T}$, are given by
\begin{equation}
T_{ij} = 2\mu \left( S_{ij} -  \frac{1}{3} S_{kk} \delta_{ij} \right) \quad\mbox{;}\quad S_{ij} \equiv \frac{1}{2}\left( \frac{\partial u_i}{\partial x_j} + \frac{\partial u_j}{\partial x_i} \right) \,\mbox{.}
\end{equation}
The mass source terms (which are complex sinusoidal functions) may be obtained from \cite{Shunn:2012}, by looking at the source code in the FDS repository \cite{FDS-SMV_repository} (see module {\ct MANUFACTURED\_SOLUTIONS} in {\ct turb.f90}), or by running the sympy (Symbolic Python) script provided under\\
{\ct /Utilities/Python/shunn3\_stokes\_mms\_sym.py}.  A feature of this particular solution is that the mass source is zero, $\dot{Q}_\rho = 0$, which provides a more realistic test case and simplifies the MMS implementation.  Note that the pressure solution has been modified from Shunn et al. \cite{Shunn:2012} so that the $H$ solution is compatible with periodic boundary conditions.  A new momentum source term is derived $\dot{Q}_{\mathbf{u}}$ that differs from Shunn et al.

\subsubsection*{Manufactured Solution Procedure}

Two species transport equations are solved.  The mixture fraction in the manufactured solution is set as component 2 while the background species is set to component 1:
\begin{align}
\label{eqn_fds_species_1} \frac{\partial (\rho Z_1)}{\partial t} + \Div(\rho Z_1 \mathbf{u}) - \Div\left(\rho D \nabla Z_1\right) &= - \dot{Q}_Z \,\mbox{,}\\
\label{eqn_fds_species_2} \frac{\partial (\rho Z_2)}{\partial t} + \Div(\rho Z_2 \mathbf{u}) - \Div\left(\rho D \nabla Z_2\right) &= + \dot{Q}_Z \,\mbox{.}
\end{align}
The density is obtained via $\rho = (\rho Z)_1 + (\rho Z)_2$.

%The divergence expression is obtained by differentiating the EOS:
%\begin{equation}
%\label{eqn_mms_div}
%\Div\mathbf{u} = \left[ \frac{1}{\rho_1} - \frac{1}{\rho_0} \right] \bigg( \Div(\rho D \nabla Z) + \dot{Q}_Z \bigg) \,\mbox{.}
%\end{equation}
%For this isothermal flow there is no alternative divergence formulation to consider.

The RHS of the momentum equation is augmented as follows:
\begin{equation}
\label{eqn_mms_u_eqn}
\frac{\partial \mathbf{u}}{\partial t} = - ( \mathbf{F} + \nabla H ) + \dot{Q}_{\mathbf{u}} \,\mbox{.}
\end{equation}
The Poisson equation for $H$ becomes
\begin{align}
\label{eqn_poisson_mms}
\nabla^2 H = - \left[ \Div \left( \mathbf{F} - \dot{Q}_{\mathbf{u}} \right) + \frac{\partial}{\partial t} (\Div\mathbf{u}) \right] \,\mbox{.}
\end{align}

%For the flow to remain isothermal the ideal gas law must be obeyed identically. Since a transport equation is solved for density, the mixture fraction must be obtained from the EOS.  Hence, in this problem $Z$ plays the role usually played by temperature in a typical fire problem.  For the manufactured solution, the basic FDS algorithm is modified as follows.  Given $u_i^n$, $\rho^n$, $Z^n$, and $H^n$ at time $t^n$:
%\begin{enumerate}
%\item \label{item_rho_mms} Update the density equation (\ref{eqn_mms_continuity}) to obtain $\rho^{n+1}$.
%\item \label{item_Z_mms}   Obtain $Z^{n+1}$ from the equation of state (\ref{eqn_mms_eos}).
%\item \label{item_div_mms} Compute $(\Div \mathbf{u})^{n+1}$ from (\ref{eqn_mms_div}).
%\item \label{item_pois_mms} Solve the Poisson equation (\ref{eqn_poisson_mms}) for $H^{n+1}$.
%\item \label{item_mom_mms} Update momentum (\ref{eqn_mms_u_eqn}) using the pressure field from Step \ref{item_pois_mms} to obtain $u_i^{n+1}$.
%\end{enumerate}
%This procedure represents a single stage in the RK2 time integration scheme.

Simulations were performed for $N = \{32, 64, 128, 256, 512\}$, where $N$ is the number of cells in each direction, using an adaptive time step satisfying both convective and diffusive CFL numbers of 0.5.  The time step criterion and the simulation parameters in Table \ref{tab_shunn_params} were chosen to match Shunn et al.~\cite{Shunn:2012}. The species mass density equations, (\ref{eqn_fds_species_1}) and (\ref{eqn_fds_species_2}), are solved using the CHARM flux limiter. Qualitative results for the $256^2$ case are shown in Fig.~\ref{fig_mms_evo}.  These images may be compared to the images presented in \cite{Shunn:2012}.  In Fig.~\ref{fig_mms_convergence}, we plot the $L_2$ error at time $t = 0.9$ s\footnote{At $t=1$ s the $H$ manufactured solution is trivially zero everywhere and fortuitous error cancellation occurs.} as a function of grid spacing, $\Delta x = L/N$, confirming second-order accuracy of the solutions for density, mixture fraction, and velocity.  As shown in Fig.~\ref{fig_mms_convergence}, schemes such as ours, where the pressure is set to zero at the beginning of each stage of the integration (in other words, no pressure gradient term shows up in the force on the RHS of the Poisson equation), are known to be first-order accurate for pressure \cite{Armfield:2002}. This is not a severe limitation of the algorithm since the hydrodynamic pressure does not factor into the equation of state for low-Mach flows.

\begin{figure}[ht]
\centering

% density
\begin{tikzpicture}[scale=1]
\footnotesize
\begin{axis}[
    width=0.95\linewidth,
    axis equal image,
    enlargelimits=false,
    axis x line=none,
    axis y line=none,
    colorbar,
    point meta min=1, point meta max=5,
    colormap={whiteblack}{gray(0cm)=(0); gray(1cm)=(1)},
    colorbar style={
        title={$\rho$, \si{kg/m^3}},
        at={(1.02,0.0)}, % Coordinate system relative to the main axis. (1,1) is upper right corner of main axis.
        anchor=south west,
        height=\pgfkeysvalueof{/pgfplots/parent axis height}, % Scale the colorbar relative to the main axis
        /pgf/number format/.cd, % Change the key directory to /pgf/number format
        fixed, fixed zerofill, precision=1,
        /tikz/.cd  % Change back to the normal key directory
    }
    	]
	\addplot graphics [xmin=0.00, xmax=1.00, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_density_p000};
	\addplot graphics [xmin=1.10, xmax=2.10, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_density_p125};
	\addplot graphics [xmin=2.20, xmax=3.20, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_density_p250};
	\addplot graphics [xmin=3.30, xmax=4.30, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_density_p375};
\end{axis}
\draw (1.75,3.78) node {$t=0$ s};
\draw (5.25,3.78) node {$t=0.125$ s};
\draw (8.8,3.78) node {$t=0.250$ s};
\draw (12.5,3.78) node {$t=0.375$ s};
\end{tikzpicture}

% mixture fraction
\begin{tikzpicture}[scale=1]
\footnotesize
\begin{axis}[
    width=0.95\linewidth,
    axis equal image,
    enlargelimits=false,
    axis x line=none,
    axis y line=none,
    colorbar,
    point meta min=0, point meta max=1,
    colormap={whiteblack}{gray(0cm)=(0); gray(1cm)=(1)},
    colorbar style={
        title={$Z$},
        at={(1.02,0.0)}, % Coordinate system relative to the main axis. (1,1) is upper right corner of main axis.
        anchor=south west,
        height=\pgfkeysvalueof{/pgfplots/parent axis height}, % Scale the colorbar relative to the main axis
        /pgf/number format/.cd, % Change the key directory to /pgf/number format
        fixed, fixed zerofill, precision=1,
        /tikz/.cd  % Change back to the normal key directory
    }
    	]
	\addplot graphics [xmin=0.00, xmax=1.00, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_scalar_p000};
	\addplot graphics [xmin=1.10, xmax=2.10, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_scalar_p125};
	\addplot graphics [xmin=2.20, xmax=3.20, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_scalar_p250};
	\addplot graphics [xmin=3.30, xmax=4.30, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_scalar_p375};
\end{axis}
\end{tikzpicture}

% uvelocity
\begin{tikzpicture}[scale=1]
\footnotesize
\begin{axis}[
    width=0.95\linewidth,
    axis equal image,
    enlargelimits=false,
    axis x line=none,
    axis y line=none,
    colorbar,
    point meta min=0.2, point meta max=0.8,
    colormap={whiteblack}{gray(0cm)=(0); gray(1cm)=(1)},
    colorbar style={
        title={$u$, m/s},
        at={(1.02,0.0)}, % Coordinate system relative to the main axis. (1,1) is upper right corner of main axis.
        anchor=south west,
        height=\pgfkeysvalueof{/pgfplots/parent axis height}, % Scale the colorbar relative to the main axis
        /pgf/number format/.cd, % Change the key directory to /pgf/number format
        fixed, fixed zerofill, precision=1,
        /tikz/.cd  % Change back to the normal key directory
    }
    	]
	\addplot graphics [xmin=0.00, xmax=1.00, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_uvelocity_p000};
	\addplot graphics [xmin=1.10, xmax=2.10, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_uvelocity_p125};
	\addplot graphics [xmin=2.20, xmax=3.20, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_uvelocity_p250};
	\addplot graphics [xmin=3.30, xmax=4.30, ymin=0, ymax=1] {SCRIPT_FIGURES/shunn3_256_uvelocity_p375};
\end{axis}
\end{tikzpicture}

\caption[Evolution of the variable-density manufactured solution]{Evolution of the variable-density manufactured solution.  From top to bottom, the images show density, $\rho$, mixture fraction, $Z$, and the $u$-velocity component from the $256^2$ simulation at the times shown at the top of the columns.  These results may be compared to \cite{Shunn:2012} to confirm the validity of the numerical solution.}
\label{fig_mms_evo}
\end{figure}

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/shunn_mms_convergence}
\caption[Convergence of the manufactured solution]{\label{fig_mms_convergence} Convergence for the manufactured solution.  The $L_2$ error at time $t = 0.9$ s is plotted as a function of grid spacing for $N=\{32,64,128,256,512\}$ points in each direction.  The grid spacing is $\Delta x = L/N$, where $L=2$ m.  Calculations were performed with an adaptive time step satisfying both convective and diffusive CFL (Von Neumann) limits of 0.5. These results confirm second-order accuracy of the flow solver for density, mixture fraction, and velocity. As is known for projection schemes like ours, the pressure solution (represented by $H$) is first-order accurate \cite{Armfield:2002}.}
\end{figure}

\subsubsection*{Temporal Error Analysis}

The convergence plot in Fig.~\ref{fig_mms_convergence} is based on a constant CFL with increasing spatial resolution.  From this plot, the temporal accuracy is hard to discern.  Further, the temporal accuracy for the Saad problem in Sec.~\ref{sec:saad_temporal_error} may be a special case since most of the terms in the divergence are zero for that problem.  For the Shunn case, the right-hand-side of the Poisson equation is non-trivial and so it is useful to re-examine the temporal order for this case.  As with the Saad case, here we run a series of tests at constant grid resolution $256 \times 256$ while decreasing the time step.  The three finest time steps correspond to CFL = [0.25, 0.125, 0.0625] for the solutions [$f_1$, $f_2$, $f_3$] in Eq.~(\ref{eq:temporal_order}).  The simulations are run to a total time equivalent to 2 time steps for a CFL=1 calculation.

Several different norms are considered and the results are listed in Table~\ref{tab:shunn_terr_norms}.  In the left column of the table, the $L_1$ and $L_2$ norms are taken from the vector $p$ computed pointwise on the domain.  Note that, as discussed in Sec.~\ref{sec:saad_temporal_error}, the infinity norm for this approach is degenerate.  The ``Saad'' norms are formed by taking the norms of the differences in the numerator and denominator of Eq.~(\ref{eq:temporal_order}),
\begin{equation}
\Vert p \Vert \; \mbox{Saad} = \frac{ \ln \left( \frac{\Vert f_3-f_2 \Vert}{\Vert f_2-f_1 \Vert} \right) }{\ln r}
\end{equation}

\begin{table}[ht]
\centering
\caption[Shunn temporal error norms]{Shunn temporal error norms for the order $p$.}
\begin{tabular}{lcccc}
Norm & $\rho$ & $Z$ & $u$ & $H$ \\
\hline
\input{SCRIPT_FIGURES/shunn_terr_norms}
% here are the numbers as of Aug 5, 2015
%$L_1$ & 2.0316 & 2.0342 & 2.0164 & 1.0122 \\
%$L_2$ & 2.0588 & 2.0642 & 2.0533 & 1.0362 \\
%$L_1$ Saad & 2.0292 & 2.0431 & 1.9994 & 1.0005 \\
%$L_2$ Saad & 2.0789 & 2.1276 & 1.998 & 1.0004 \\
%$L_{\infty}$ Saad & 2.1744 & 2.2366 & 1.9734 & 0.99659
\end{tabular}
\label{tab:shunn_terr_norms}
\end{table}



\section{Collapse of a Hot Layer in a Micro-gravity Environment (\texorpdfstring{\textct{hot\_layer\_360}}{hot\_layer\_360})}
\label{sec:baum_hot_layer}

\textbf{Howard R. Baum, NIST Fellow Emeritus}\\

\noindent This problem describes the collapse of a hot layer of depth $d$ adjacent to a wall at plane $y=0$ in zero gravity.  The wall is presumed to remain cool at the ambient temperature $T_0$ while the hot layer is initially $T_h$.  The initial velocity field is quiescent.  Starting at time $t=0$ the hot layer begins to diffuse into the upper cool ambient atmosphere and to expand due to dilatation.  There is also heat transfer to the wall.  The problem is 1D in the spatial coordinate $y$ and time dependent.  We are interested in the evolution of the temperature $T(y,t)$ and the velocity $v(y,t)$.

For the present problem the governing equations are
\begin{gather}
\frac{\partial \rho}{\partial t} + \frac{\partial}{\partial y}(\rho v) = 0 \\
\rho C_p \left( \frac{\partial T}{\partial t} + v \frac{\partial T}{\partial y} \right) = \frac{\partial}{\partial y} \left( k \frac{\partial T}{\partial y} \right) \\
\rho T = \rho_0 T_0
\end{gather}
Here, $\rho(y,t)$ is the mass density, $C_p$ is the heat capacity (assumed constant), and $k$ is the thermal conductivity of the gas, which we assume obeys $\rho k = \rho_0 k_0$. The initial conditions are
\begin{align}
v(y,0) &= 0 \\
T(y,0) &= \left\{ \begin{array}{ll} T_h & \mbox{for} \quad 0 < y \le d \\ T_0 & \mbox{for} \quad y > d \end{array} \right.
\end{align}
The boundary conditions are
\begin{align}
v(0,t) &= 0 \\
T(0,t) &= T_0 \\
T(y,t) &\rightarrow T_0 \;\mbox{as}\; y\rightarrow\infty
\end{align}
Note that no boundary condition can be imposed on $v$ far from the boundary.  In FDS, an {\ct OPEN} boundary is applied.

Introducing the dimensionless coordinate $\lambda$ and dimensionless time $\tau$, the dimensionless physical coordinate $Y(\lambda,\tau)$, velocity $V(\lambda,\tau)$, and temperature $\theta(\lambda,\tau)$ are related to dimensional quantities as follows:
\begin{align}
t &= \rho_0 C_p d^2/k_0 \, \tau  \\
y &= d \, Y(\lambda,\tau) \\
v &= k_0/(\rho_0 C_p d) \, V(\lambda,\tau) \\
T &= T_0 \, \theta(\lambda,\tau)
\end{align}
The solution is then given by the following (for coding details see {\ct hot\_layer\_collapse.m}):
\begin{gather}
f(\lambda,\tau,a) = -2\sqrt{\tau/\pi}\;\exp(-(a-\lambda)^2/(4\tau)) + (a+\lambda)\;\erfc((a+\lambda)/(2\sqrt{\tau})) \\
F(\lambda,\tau,a) = f(\lambda,\tau,a) - f(0,\tau,a) \\
Y(\lambda,\tau,T_h,T_0) = \lambda + (T_h-T_0)/T_0( -F(\lambda,\tau,0) + \mbox{$\frac{1}{2}$}( F(\lambda,\tau,T_0/T_h) + F(\lambda,\tau,-T_0/T_h) ) ) \\
U(\lambda,\tau,T_h,T_0) = -\erfc(\lambda/(2\sqrt{\tau})) + \mbox{$\frac{1}{2}$}( \erfc( (\lambda - T_0/T_h)/(2\sqrt{\tau}) ) + \erfc( (\lambda + T_0/T_h)/(2\sqrt{\tau}) ) ) \\
\theta(\lambda,\tau,T_h,T_0) = 1 + ( (T_h - T_0)/T_0 ) \, U(\lambda,\tau,T_h,T_0) \\
G(\lambda,\tau,a) = 1/\sqrt{\pi\tau} \, ( -\exp(-(a+\lambda)^2/(4\tau)) + \exp(-a^2/(4\tau)) ) \\
V(\lambda,\tau,T_h,T_0) = (T_h-T_0)/T_0 \, ( -G(\lambda,\tau,0) + \mbox{$\frac{1}{2}$}(G(\lambda,\tau,T_0/T_h) + G(\lambda,\tau,-T_0/T_h)) )
\end{gather}
Figure~\ref{fig_hot_layer} shows the analytical solution (solid lines) plotted together with the FDS (DNS) numerical results (open symbols).  The plots on the left are of temperature profiles at several times (different colors demarcate different nondimensional times $\tau$).  The plots on the right are velocity.  As can be seen, the agreement is excellent.

\begin{figure}[ht]
\centering
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/hot_layer_temp_1}
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/hot_layer_vel_1}
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/hot_layer_temp_2}
\includegraphics[width=.49\textwidth]{SCRIPT_FIGURES/hot_layer_vel_2}
\caption[The {\ct hot\_layer\_collapse} test case]{Hot layer solution. Lines are the analytical solution.  Symbols are the FDS results.}
\label{fig_hot_layer}
\end{figure}




\section{2D Vortex Simulation (\texorpdfstring{\textct{vort2d}}{vort2d})}
\label{two_dimensional_vortex}

\textbf{Max Gould, NIST SURF student}\\
\textbf{Ragini Acharya, United Technologies Research Center}\\

\noindent In this section we present another case that demonstrates the second-order accuracy of the FDS transport algorithm. We consider the analytically stable flow field consisting of a single vortex advected by a uniform flow, a test case developed by CERFACS\footnote{Centre Europ\'een de Recherche et de Formation Avanc\'ee en Calcul Scientifique} \cite{cerfacs_test}. Maintaining the geometry of the vortex over time provides a good measure of the order of accuracy of the transport scheme.

\begin{figure}[h!]
   \centering
   \setlength{\unitlength}{0.0008in}
   \begin{picture}(7300,3420)
      \put(1030,50){$L = 0.3112$ m}
      \put(130,850){$U_{0} = 35$ m/s}
      \put(0,250){\framebox(3112,3112)}
      \put(1056,1306){\dashbox{100}(1000,1000)}
      \put(1056,1306){\line(3,-1){3194}}
      \put(1056,2306){\line(3,1){3194}}
      \put(100,672){\vector(1,0){450}}
      \put(100,1394){\vector(1,0){450}}
      \put(100,2216){\vector(1,0){450}}
      \put(100,2938){\vector(1,0){450}}
      \put(2562,672){\vector(1,0){450}}
      \put(2562,1394){\vector(1,0){450}}
      \put(2562,2216){\vector(1,0){450}}
      \put(2562,2938){\vector(1,0){450}}
      \put(1556,1806){\circle{550}}
      \put(1281,1806){\vector(0,-1){50}}
      \put(1831,1806){\vector(0,1){50}}
      \put(3450,-250){
         \scalebox{.498}{\includegraphics{SCRIPT_FIGURES/vort2d_diagram}}
      }
   \end{picture}
   \caption[Vector field of a two-dimensional vortex]{Vector field of a two-dimensional vortex in a constant flow field.}
   \label{fig_vort2d_diagram}
\end{figure}

\noindent The vortex is initially defined as the gradient of the potential field,
\begin{equation}
\label{eqn_vort2d}
\Psi_{0} (x,z) = \Gamma \ \exp \left[ - \frac{x^{2} + z^{2}}{2 \ R_{c}^{2}} \right],
\end{equation}
where $\Gamma$ determines its intensity and $R_c$ its characteristic size. The velocity components are determined by taking the gradient of the potential field superimposed on the constant flow field of velocity $U_0$ in the positive $x$ direction,
\begin{eqnarray}
\label{eqn_uvel}
u (x,z) &\equiv& U_{0} + \frac{\partial}{\partial z} \Psi_{0} = U_{0} - \frac{\Gamma \ z}{R_{c}^{2}} \exp \left[ - \frac{x^{2} + z^{2}}{2 \ R_{c}^{2}} \right], \\
w (x,z) &\equiv& - \frac{\partial}{\partial x} \Psi_{0} = \frac{\Gamma \ x}{R_{c}^{2}} \exp \left[ - \frac{x^{2} + z^{2}}{2 \ R_{c}^{2}} \right],
\end{eqnarray}
where $u$ and $w$ refer to velocity in the $x$ and $z$-directions, respectively. For our purposes we need only analyze one component of the velocity field. We will focus our attention on the $u$-component of velocity.

We define the computational domain as a two-dimensional square region, $L=0.3112$~m on a side, with periodic boundary conditions. The domain is discretized for a range of square, two-dimensional meshes of $40^{2}$, $80^{2}$, $160^{2}$, and $320^{2}$ grid cells. For the purposes of this test, we set the flow parameters as
\[
\begin{array}{lll}
U_{0} &&= 35 \ \mathrm{m/s} \\
R_{c} &= L / 20 &= 0.01556 \ \mathrm{m} \\
\Gamma &= 0.04 \ U_{0} \ R_{c} \ \sqrt{e} &= 0.0359157
\end{array}
\]
The constant flow field and periodic boundary conditions cause the vortex to repeatedly pass through the computational domain. The ``pass-through'' time, $t_{f}$, is defined as the time period required for the stable vortex to return to its original position,
\begin{equation*}
t_{f} = L / U_{0} \simeq 8.8914 \times 10^{-3} \ \mathrm{s}.
\end{equation*}
To ensure that the numerical solution converges to the analytical solution, we set the time step, $\dt$, so that the Courant-Friedrichs-Lewy (CFL) number is 0.5.


\begin{figure}[h]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/vort2d_80_uzgraph} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/vort2d_160_uzgraph}
   \end{tabular*}
   \caption[Velocity in the \textct{vort2d} test case]{$u$-velocity along the $z$-axis at $x=0$ plotted for each of the vortex's first four loops through the computational domain. (Left) $80^{2}$ grid cell model. (Right) $160^{2}$ grid cell model.}
   \label{fig_vort2d_axisvelocity}
\end{figure}

A plot of $u$-velocity values just along the $z$-axis provides a simple characterization of the vortex geometry. The extent to which this geometry changes over time provides a qualitative measure of the accuracy of the transport algorithm. Figure \ref{fig_vort2d_axisvelocity} displays these plots for two different grid resolutions. Each line represents a plot taken for a different number of flow-through times such that the red lines represent the vortex after it has undergone the most passes through the computational domain while the green lines represent the vortex in the initial phase. The broken black line represents the analytical solution. As the vortex undergoes more passes through the computational domain, its velocity profile diverges further and further from the analytical profile. While divergence still occurs on the finer mesh, the extent to which it diverges after the same number of flow-through times is significantly smaller.

\begin{figure}[h!]
   \centering
    \includegraphics[height=2.2in]{SCRIPT_FIGURES/vort2d_error}
    \caption[Convergence study for the \textct{vort2d} test case]{RMS error between simulated and analytical $u$-velocity values along the $z$-axis plotted for each grid resolution at each of three subsequent passes of the vortex through the computational domain.}
    \label{fig_vort2d_error}
\end{figure}

The rate with which the simulated profiles converge to the analytical one defines the order of accuracy of the numerical scheme. In Fig.~\ref{fig_vort2d_error} we plot the rms error of the numerical solution as a function of the grid resolution. The three colored curves represent the rms error at three different pass-through times. The broken and solid black lines represent the plot gradient corresponding to first and second order error respectively. While the error increases with each flow-through time, the gradients of the lines are roughly parallel to the solid black line, indicating second-order accuracy of the numerical scheme.

To analyze the stability of the vortex at times other than discrete multiples of the pass-through time, consider the time-dependent potential field and its corresponding $u$-velocity component:
\begin{equation}
\label{eqn_vort2d_timedep}
\Psi (x,z,t) = \Psi_{0} \exp \left[\frac{2 \ U_{0} \ x \ t - U_{0}^{2} \ t^{2}}{2 \ R_{c}^{2}} \right],
\end{equation}
\begin{equation}
\label{eqn_uvel_timedep}
u (x,z,t) = U_{0} - \Psi_{0} \ \frac{z}{R_{c}^{2}} \exp \left[\frac{2 \ U_{0} \ x \ t - U_{0}^{2} \ t^{2}}{2 \ R_{c}^{2}} \right].
\end{equation}
In Fig.~\ref{fig_vort2d_pointvelocity}, we show the $u$-velocity at a single point, on the lower left fringe of the vortex, for two different mesh resolutions, $80^{2}$ and $160^{2}$. A mesh resolution of $320^{2}$ grid cells produces a plot (not shown) that is, to the eye, a perfect match out to four pass-through times.

\begin{figure}[h!]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/vort2d_80_upgraph} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/vort2d_160_upgraph}
   \end{tabular*}
   \caption[Time history of velocity at a point showing qualitative convergence]{Simulated and analytical values of $u$-velocity at a point plotted as a function of time over a time period equal to four times the flow-through time. (Left) $80^{2}$ grid cell model. (Right) $160^{2}$ grid cell model.}
   \label{fig_vort2d_pointvelocity}
\end{figure}



\section{Boundedness Tests}

\subsection{Species Bounds (\texorpdfstring{\textct{bound\_test\_*}}{bound\_test\_*})}
\label{bound_test_1}
\label{bound_test_2}

When multiple infinitely fast reactions are present it is not trivial to correctly partition the limiting reactant and maintain species bounds.  FDS uses a special subcycling algorithm by Kahaner \cite{Kahaner:1989} to maintain boundedness for species when time integrating the ODEs for the chemical reaction step (the method is further discussed in the FDS Tech Guide \cite{FDS_Math_Guide}).  In this section, we examine two test cases designed to verify the time integration method.

The first case, {\ct bound\_test\_1}, consists of two independent reactions, one with air as the limiting reactant, one with fuel as the limiting reactant.  The stoichiometry of each reaction is the same: $\mathrm{F} + \mathrm{A} \rightarrow 2\,\mathrm{P}$.  The initial volume fractions of determine which species are limiting.  The results are shown in Fig.~\ref{fig:bound_test_1}.  For the first reaction, $X_{\rm F1}$ is initially 0.3 and $X_{\rm A1}$ is initially 0.2.  Therefore, all the A1 is converted to P1, which has a final volume fraction of $X_{\rm P1}=0.4$.  In the second reaction, the initial fuel volume fraction is $X_{\rm F2}=0.1$ (limiting) and the initial air volume fraction is $X_{\rm A2}=0.4$.  As can be see in Fig.~\ref{fig:bound_test_1}, the resulting final values give a product volume fraction of twice the limiting reactant, $X_{\rm P2}=0.2$.

\begin{figure}[!ht]
   \centering
   \includegraphics[height=2.2in]{SCRIPT_FIGURES/bound_test_1}
   \caption[Results of the {\ct bound\_test\_1} case]{Results of the {\ct bound\_test\_1} case.}
   \label{fig:bound_test_1}
\end{figure}

The second test case, {\ct bound\_test\_2}, is more challenging---we add a third reaction that uses the same fuel species as the first and the same air species as the second.  The reaction scheme is as follows:
\begin{align}
\mathrm{F1} + \mathrm{A1} &\rightarrow 2\,\mathrm{P1} \\
\mathrm{F2} + \mathrm{A2} &\rightarrow 2\,\mathrm{P2} \\
\mathrm{F1} + \mathrm{A2} &\rightarrow 2\,\mathrm{P3}
\end{align}
The initial conditions and final results are shown in Fig.~\ref{fig:bound_test_2}.  As discussed in the FDS Tech Guide \cite{FDS_Math_Guide}, the right-hand-side of the chemistry ODE is set up assuming a large Arrhenius constant and no activation energy and (in this case) second-order concentration dependence for each reaction.  It can be shown through numerical experiments that this assumption is equivalent to applying Curl's mixing model (Coalescence-Dispersion) \cite{Curl:1} in a batch reactor with infinitely fast chemistry.
\begin{figure}[!ht]
   \centering
   \includegraphics[height=2.2in]{SCRIPT_FIGURES/bound_test_2}
   \caption[Results of the {\ct bound\_test\_2} case]{Results of the {\ct bound\_test\_2} case.}
   \label{fig:bound_test_2}
\end{figure}

\subsection{Isothermal Helium Wave (\texorpdfstring{\textct{helium\_1d\_isothermal}}{helium\_1d\_isothermal})}
\label{helium_1d_isothermal}

This is a test of isothermal advection and mixing of gases with different molecular weights using the default algorithm.  A companion case using a simplified algorithm for {\ct CONSTANT\_SPECIFIC\_HEAT\_RATIO} is given below in Sec.~\ref{helium_1d_const_gamma}.  In the present case, a wave of helium propagates in one dimension down the length of a square duct with frictionless walls.  The initial and inlet temperatures are 25 \si{\degreeCelsius} and should remain so throughout the course of the simulation. In Fig.~\ref{fig_helium_1d_isothermal} we plot the simulation results for temperature, sensible enthalpy, and velocity.  The temperature should remain constant at 25 \si{\degreeCelsius}.  The sensible enthalpy, which is referenced to 25 \si{\degreeCelsius}, should remain at 0 \si{kJ/m^3}.  And the velocity should level off at 1 m/s and hold steady.  This output is checked to make sure that no boundary effects manage to pollute the simulation.

\begin{figure}[!ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_1d_isothermal_T} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_1d_isothermal_HS} \\
      \multicolumn{2}{c}{\includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_1d_isothermal_W}}
   \end{tabular*}
   \caption[Results of the {\ct helium\_1d\_isothermal} cases]{Results of the {\ct helium\_1d\_isothermal} cases.}
   \label{fig_helium_1d_isothermal}
\end{figure}

\subsection{Temperature Bounds for Isothermal Helium Jet (\texorpdfstring{\textct{helium\_air\_jet\_floor}}{helium\_air\_jet\_floor})}
\label{helium_air_jet_floor}

In this test, a jet of helium is generated from a floor vent.  The mass flux is ramped up from 0 m/s to 1 m/s in 1 s.  The flow field should remain isothermal at 20 \si{\degreeCelsius}.  The results are shown in Fig.~\ref{helium_air_jet}.

\begin{figure}[!ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_air_jet_floor_minT} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_air_jet_floor_maxT}
   \end{tabular*}
   \caption[Results of the {\ct helium\_air\_jet\_floor} case]{Results of the {\ct helium\_air\_jet\_floor} case.}
   \label{helium_air_jet}
\end{figure}

\subsection{Temperature Bounds for Large Differences in Molecular Weight (\texorpdfstring{\textct{mwtest\_cfl}}{mwtest\_cfl})}
\label{mwtest_cfl}

Hydrogen gas (2~g/mol) is injected into a small compartment filled with sulfur hexafluoride (146~g/mol). There should be no change in temperature, as shown in Fig.~\ref{mwtest_cfl_fig}.

\begin{figure}[!ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/mwtest_cfl_minT} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/mwtest_cfl_maxT}
   \end{tabular*}
   \caption[Results of the {\ct mwtest\_cfl} case]{Results of the {\ct mwtest\_cfl} case.}
   \label{mwtest_cfl_fig}
\end{figure}

\subsection{Temperature Lower Bound in a Fire Simulation (\texorpdfstring{\textct{tmp\_lower\_limit}}{tmp\_lower\_limit})}
\label{tmp_lower_limit}

A 2-D methane-air diffusion flame calculation is run three different ways to check that the temperature does not fall below the ambient (20~$^\circ$C). The results are shown in Fig.~\ref{tmp_lower_limit_fig}. The upper left plot shows the global minimum temperature for the case where the reaction stoichiometry is specified explicitly. The upper right plot is for the case where the initial time step is lowered to 0.001~s. The lower plot is for the case where the simple chemistry model is used.

\begin{figure}[!ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/tmp_lower_limit_default} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/tmp_lower_limit_dt_p001} \\
      \multicolumn{2}{c}{\includegraphics[height=2.2in]{SCRIPT_FIGURES/tmp_lower_limit_simple}}
   \end{tabular*}
   \caption[Results of the {\ct tmp\_lower\_limit} cases]{Results of the {\ct tmp\_lower\_limit} cases.}
   \label{tmp_lower_limit_fig}
\end{figure}


\section{Constant Specific Heat Ratio}
\label{const_gamma}

The ratio $\gamma = c_p/c_v$ is called the ``ratio of specific heats''. For many simple gases, $\gamma = \mathrm{constant}$ is a good approximation.  The specific heat of species $\alpha$ in the gas phase is then given by
\begin{equation}
c_{p,\alpha} = \frac{R}{W_\alpha}\frac{\gamma_\alpha}{\gamma_\alpha-1}
\end{equation}
where $R$ is the ideal gas constant.  When this assumption is viable, many terms in the energy equation drop out, greatly simplifying the divergence expression and thus speeding up the code.  These simplifications require that the sensible enthalpy of the gas is referenced to 0 K (see the FDS Tech Guide \cite{FDS_Math_Guide}).  In this section, we examine three cases using the assumption of constant specific heat ratio: one tests mixing of two gases with different molecular weights ({\ct helium\_1d\_const\_gamma}), one tests fire conditions ({\ct fire\_const\_gamma}), and one tests evaporation of water droplets ({\ct water\_evap\_1\_const\_gamma}).  Each of these cases is a clone of cases we develop later in this guide for the default version of the code.

\subsection{Helium Wave using Constant Specific Heat Ratio (\texorpdfstring{\textct{helium\_1d\_const\_gamma}}{helium\_1d\_const\_gamma})}
\label{helium_1d_const_gamma}

In this problem, a wave of helium propagates in one dimension down the length of a square duct with frictionless walls.  The initial and inlet temperatures are 25 \si{\degreeCelsius} and should remain so throughout the course of the simulation.  The ratio of specific heats is kept at the default value of $\gamma = 1.4$.  The molar weights, heat capacities, and enthalpies for both air and helium are given in Table \ref{tab:helium_1d_const_gamma}.  Notice that the sensible enthalpies, $h_{s,\alpha}=\rho_\alpha c_{p,\alpha} T$, are the same for both species.

\begin{table}[ht]
\centering
\caption[Helium constant specific heat ratio]{Helium constant specific heat ratio parameters.}
\begin{tabular}{lcccc}
Species & $W_\alpha$ (kg/kmol) & $\rho_\alpha$ (\si{kg/m^3}) & $c_{p,\alpha}$ (kJ/kg/K) & $h_{s,\alpha}$ (\si{kJ/m^3}) \\
\hline
Air    & 28.73167 & 1.174 & 1.0128 & 355 \\
Helium &  4.00260 & 0.164 & 7.2705 & 355 \\
\end{tabular}
\label{tab:helium_1d_const_gamma}
\end{table}

In Fig.~\ref{fig_helium_1d_const_gamma} we plot the simulation results for temperature, sensible enthalpy, and velocity.  The temperature should remain constant at 25 \si{\degreeCelsius}.  The sensible enthalpy should remain constant at 355 \si{kJ/m^3}.  And the velocity should level off at 1 m/s and hold steady.  This output is checked to make sure that no boundary effects manage to pollute the simulation.

\begin{figure}[ht!]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_1d_const_gamma_T} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_1d_const_gamma_HS} \\
      \multicolumn{2}{c}{\includegraphics[height=2.2in]{SCRIPT_FIGURES/helium_1d_const_gamma_W}}
   \end{tabular*}
   \caption[Results of the {\ct helium\_1d\_const\_gamma} cases]{Results of the {\ct helium\_1d\_const\_gamma} cases.}
   \label{fig_helium_1d_const_gamma}
\end{figure}

\subsection{Fire Plume using Constant Specific Heat Ratio (\texorpdfstring{\textct{fire\_const\_gamma}}{fire\_const\_gamma})}
\label{fire_const_gamma}

In this case a 128 \si{m^3} box is initially filled with air at 20 \si{\degreeCelsius}. A 1000 MW propane fire with a 5 \% soot yield is placed at the bottom of the box for 20 s. All the compartment surfaces are adiabatic. The net change in enthalpy and pressure can be computed using the specific heat ratio based constant specific heat values for the air and product species along with the pressure work required to inject the fuel. The FDS predicted enthalpy and pressure change are shown in Fig \ref{fig_fire_const_gamma} compared with the predicted values.

\begin{figure}[ht!]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/fire_const_gamma_dH} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/fire_const_gamma_dP}
   \end{tabular*}
   \caption[Results of the {\ct fire\_const\_gamma} case]{Results of the {\ct fire\_const\_gamma} case.}
   \label{fig_fire_const_gamma}
\end{figure}

\subsection{Evaporation with Constant Specific Heat Ratio (\texorpdfstring{\textct{water\_evap\_1\_const\_gamma}}{water\_evap\_1\_const\_gamma})}
\label{water_evap_1_const_gamma}

This test case is a replica of {\ct water\_evaporation\_1} in Sec.~\ref{water_evaporation_1} using constant specific heat ratio.  A 1 \si{m^3} box is initially filled with dry air at 200 \si{\degreeCelsius} and monodisperse water droplets totaling 0.01 kg in mass initially at 20 \si{\degreeCelsius}.  In this case, all the water evaporates.  The final gas temperature may be computed from energy conservation.  Pressure change may be computed from the ideal gas law.  Results are shown in Fig.~\ref{water_evap_1_const_gamma_plots}.  Details of the expected results may be found in {\ct water\_evap\_1\_const\_gamma.m} in the {\ct Utilities/Matlab/scripts/} directory in the FDS repository \cite{FDS-SMV_repository}.

\begin{figure}[ht!]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evap_1_const_gamma_enthalpy} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evap_1_const_gamma_humidity} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evap_1_const_gamma_density} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evap_1_const_gamma_temperature} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evap_1_const_gamma_pressure} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evap_1_const_gamma_water_mass}
\end{tabular*}
\caption[Sample case \textct{water\_evap\_1\_const\_gamma}]{Output of the \textct{water\_evap\_1\_const\_gamma} test case.}
\label{water_evap_1_const_gamma_plots}
\end{figure}


\chapter{Turbulence}


\section{Decaying Isotropic Turbulence}
\label{decaying_isotropic_turbulence}

In this section we present a canonical flow for LES which tests whether the subgrid stress model has been coded properly. In some cases the difference between verification and validation is not so clear.  Once a model is well-established and validated it may actually be used as a form of verification.  Granted, such a test is not as strong a verification as the convergence study shown in Section \ref{ns2d}.  Nevertheless, these tests are often quite useful in discovering problems within the code.  The case we examine in this section, decaying isotropic turbulence, is highly sensitive to errors in the advective and diffusive terms because the underlying physics is inherently three-dimensional and getting the problem right depends strongly on a delicate balance between vorticity dynamics and dissipation.  An even more subtle yet extremely powerful verification test is also presented in this section when we set both the molecular and turbulent viscosities to zero and confirm that the integrated kinetic energy within the domain remains constant.   In the absence of any form of viscosity, experience has shown that the slightest error in the advective terms or the pressure projection will cause the code to go unstable.  This verification is therefore stronger than one might initially expect.

In this section we test the FDS model against the low Reynolds number (Re) data of Comte-Bellot and Corrsin (CBC) \cite{CBC}. Viscous effects are important in this data set for a well-resolved LES, testing the model's Re dependence.  Following \cite{SdBK}, we use a periodic box of side $L = 9 \times 2\pi$ cm ($\approx 0.566$ m) and $\nu = 1.5 \times 10^{-5}$ $\mbox{m}^2/\mbox{s}$ for the kinematic viscosity. The non-dimensional times for this data set are: $x/M = 42$ (initial condition), $98$, and $171$, where $M$ is the characteristic mesh spacing of the CBC wind tunnel and $x$ is the downstream location of the data station. Considering the mean velocity in the CBC wind tunnel experiment, these correspond to dimensional times of $t = 0.00$ s, $0.28$ s, and $0.66$ s in our simulations.

The initial condition for the FDS simulation is generated by superimposing Fourier modes with random phases such that the spectrum matches that of the initial CBC data.  An iterative procedure is employed where the field is allowed to decay for small time increments subject to Navier-Stokes physics, each wavenumber is then injected with energy to again match the initial filtered CBC spectrum.  The specific filter used here is discussed in \cite{McDermott:2005b}.

To provide the reader with a qualitative sense of the flow, Fig.~\ref{fig_cbc_smv} shows the initial and final states of the velocity field in the 3D periodic domain.  The flow is unforced and so if viscosity is present the total energy decays with time due to viscous dissipation.

\subsection{Constant Smagorinsky (\texorpdfstring{\textct{csmag}}{csmag})}

Because the viscous scales are unresolved, a subgrid stress model is required. Here the stress is closed using the gradient diffusion hypothesis and the eddy viscosity is modeled by the constant coefficient Smagorinsky model with the coefficient taken to be $C_{\rm s} = 0.2$ (see the Technical Reference Guide for further details).

The decay curves for two grid resolutions are shown on the left in Fig.~\ref{fig_cbc_energy}.  For an LES code such as FDS which uses a physically-based subgrid model, an important verification test is to run this periodic isotropic turbulence simulation in the absence of both molecular and turbulent viscosity.  For so-called ``energy-conserving'' explicit numerics the integrated energy will remain nearly constant in time.  This is demonstrated by the dash-dot line in the top-left plot in Fig.~\ref{fig_cbc_energy}.  The deviations from identical energy conservation (to machine precision) are due solely to the time discretization (the spatial terms are conservative as discussed in \cite{Morinishi}) and converge to zero as the time step goes to the zero.  Note that strict energy conservation requires implicit time integration \cite{Ham,McDermott:2007b} and, as shown by the dashed curve on the same plot where only molecular viscosity is present in the simulation, this cost is unwarranted given that the molecular dissipation rate clearly overshadows the relatively insignificant amount of numerical dissipation caused by the explicit method.  The FDS result using the Smagorinsky eddy viscosity (the black solid line) matches the CBC data (red open circles) well for the $32^3$ case (top-left).  However, the FDS results are slightly too dissipative in the $64^3$ case (bottom-left).  This is due to a well-known limitation of the constant coefficient Smagorinsky model: namely, that the eddy viscosity does not converge to zero at the appropriate rate as the filter width (here equivalent to the grid spacing) is decreased.
\begin{figure}[t]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/csmag_64_000} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/csmag_64_689} }
   \end{tabular*}
   \caption[Initial and final states for isotropic turbulence]{Initial and final states of velocity magnitude for the isotropic turbulence field.}
   \label{fig_cbc_smv}
\end{figure}

To the right of each decay curve plotted in Fig.~\ref{fig_cbc_energy} is the corresponding spectral data comparison.  The three black solid lines are the CBC spectral data for the points in time corresponding to dimensional times of $t = 0.00$ s, $0.28$ s, and $0.66$ s in our simulations.  As described above, the initial FDS velocity field (represented by the black dots) is specified to match the CBC data up to the grid Nyquist limit.  From there the spectral energy decays rapidly as discussed in \cite{McDermott:2005b}.  For each of the spectral plots on the right, the results of interest are the values of the red and blue dots and how well these match up with the corresponding CBC data.  For the $32^3$ case (top-right) the results are remarkably good.  Interestingly, the results for the more highly resolved $64^3$ case are not as good.  This is because the viscous scales are rather well-resolved at the later times in the experiment and, as mentioned, the constant coefficient Smagorinsky model is too dissipative under such conditions. (The choice of the model constant also affects these results---better agreement with the $64^3$ case could be achieved with a lower value of $C_{\rm s}$, but the agreement in the $32^3$ case would then be worse.)

\begin{figure}[t]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/csmag_32_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/csmag_32_spectra} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/csmag_64_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/csmag_64_spectra} }
   \end{tabular*}
   \caption[Integrated and spectral energy decay for CBC experiment using constant Smagorinsky]{\label{fig_cbc_energy} \small (Left) Time histories of integrated kinetic energy corresponding to the grid resolutions on the right side of the figure.  In the $32^3$ case (top), the CBC data (open circles) are obtained by applying a filter to the CBC energy spectra at the Nyquist limit for an $N=32$ grid.  Similarly, for the $64^3$ case (bottom), the CBC data are obtained from filtered spectra for an $N=64$ grid. (Right) Energy spectra for the $32^3$ case (top) and the $64^3$ case (bottom).  The solid black lines are the spectral data of Comte-Bellot and Corrsin at three different points in time corresponding to downstream positions in the turbulent wind tunnel.  The initial condition for the velocity field (spectra shown as black dots) in the FDS simulation is prescribed such that the energy spectrum matches the initial CBC data.  The FDS energy spectra corresponding to the subsequent CBC data are shown by the red and blue dots. The vertical dashed line represents the wavenumber of the grid Nyquist limit. }
\end{figure}

Overall, the agreement between the FDS simulations and the CBC data is satisfactory and any discrepancies can be explained by limitations of the model.  Therefore, as a verification the results here are positive in that nothing points to coding errors.





\subsection{Dynamic Smagorinsky (\texorpdfstring{\textct{dsmag}}{dsmag})}
\label{dynamic_smagorinsky_model}

In the previous section, all calculations were performed with a constant and uniform Smagorinsky coefficient, $C_{\rm s} = 0.2$.  For the canonical case of homogeneous decaying isotropic turbulence -- \emph{at sufficiently high Reynolds number} -- this model is sufficient.  However, we noticed that even for the isotropic turbulence problem when the grid Reynolds number is low (i.e., the flow is well-resolved) the constant coefficient model tends to over predict the dissipation of kinetic energy (see Fig.~\ref{fig_cbc_energy}).  This is because the eddy viscosity does not converge to zero at the proper rate; so long as strain is present in the flow (the magnitude of the strain rate tensor is nonzero), the eddy viscosity will be nonzero.  This violates a guiding principle in LES development: that the method should converge to a DNS if the flow field is sufficiently resolved.

The dynamic procedure for calculating the model coefficient (set \textct{TURBULENCE\_MODEL=`DYNAMIC \\ \ct SMAGORINSKY'} on \textct{MISC}) alleviates this problem.  The basis of the model is that the coefficient should be the same for two different filter scales within the inertial subrange.  Details of the procedure are explained in the following references \cite{Germano:1991,PinoMartin:2000,Moin:1991,Lund:1997,FDS_Math_Guide}.  Here we present results for the implementation of the dynamic model in FDS.  In Fig.~\ref{fig_c_smag} we show contours of the Smagorinsky coefficient $C_{\rm s}(\mathbf{x},t)$ at a time midway through a $64^3$ simulation of the CBC experiment.  Notice that the coefficient ranges from 0.00 to roughly 0.30 within the domain with the average value falling around 0.17.

\begin{figure}[t]
\centering
\includegraphics[height=3.00in]{SCRIPT_FIGURES/dsmag_64_300}
\caption[Dynamic Smagorinsky coefficient]{Smagorinsky coefficient for a $64^3$ simulation of the CBC experiment.}
\label{fig_c_smag}
\end{figure}

Next, in Fig.~\ref{fig_dynsmag_cbc}, we show results for the dynamic model analogous to Fig.~\ref{fig_cbc_energy}.  For the $32^3$ case the result is not dramatically different than the constant coefficient model.  In fact, one might argue that the $32^3$ constant coefficient results are slightly better.  But there are several reasons why we should not stop here and conclude that the constant coefficient model is superior.  First, as pointed out in Pope Exercise 13.34 \cite{Pope:2000}, $38^3$ is required to resolve 80 \% of the total kinetic energy (for this flow) and thus put the cutoff wavenumber within the inertial subrange of turbulent length scales.  Pope recommends that simulations which are under-resolved by this criterion should be termed ``very large-eddy simulations''---weather forecasting is a typical example.  For a $32^3$ LES, the test filter width in the dynamic model falls at a resolution of $16^3$, clearly outside the inertial range.  A tacit assumption underlying the original interpretation of the dynamic model is that both the grid filter scale and the test filter scale should fall within the inertial range, since this is the range in which the scales of turbulent motion (in theory) exhibit fractal-like, scale similarity (recently the procedure has been derived from other arguments \cite{Pope:2004}).  With this in mind, it is perhaps not surprising that the dynamic model does not perform optimally for the low resolution case.  In the higher resolution $64^3$ case, however, the dynamic model does perform better than the constant coefficient model---and this is the desired result: we want better performance at higher resolution.  As can be seen from the energy spectra (lower right), the energy near the grid Nyquist limit is more accurately retained by the dynamic model.  This equates to better flow structure with fewer grid cells.  Thus, for practical calculations of engineering interest the small computational overhead of computing the coefficient may be recuperated by a reduction in cell count.

\begin{figure}[h]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/dsmag_32_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/dsmag_32_spectra} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/dsmag_64_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/dsmag_64_spectra} }
   \end{tabular*}
   \caption[Integrated and spectral energy decay for CBC experiment using dynamic Smagorinsky]{\label{fig_dynsmag_cbc} Dynamic Smagorinsky model results (analogous to Fig.~\ref{fig_cbc_energy}) for integrated kinetic energy (left) and spectra (right).}
\end{figure}


\subsection{Deardorff (\texorpdfstring{\textct{deardorff}}{deardorff})}
\label{Deardorff_model}

In this section we present the results for the FDS implantation of the Deardorff isotropic eddy viscosity model, $\nu_t = C_\nu \,\sqrt{k_{sgs}} \Delta$, where $C_\nu = 0.1$ \cite{Pope:2000,Deardorff:1980}.  Instead of transporting the subgrid kinetic energy, in FDS $k_{sgs}$ is estimated with an algebraic closure based on scale similarity \cite{Bardina:1980}.  As may be seen in Fig.~\ref{fig_deardorff_cbc}, for this case the Deardorff model is comparable to dynamic Smagorinsky.  Deardorff is cheaper computationally, however, and tends to perform better for low resolution fire plume dynamics than the dynamic model. For these reasons, Deardorff is the default turbulence model in FDS.

\begin{figure}[h]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/deardorff_32_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/deardorff_32_spectra} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/deardorff_64_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/deardorff_64_spectra} }
   \end{tabular*}
   \caption[Integrated and spectral energy decay for CBC experiment using Deardorff's model]{\label{fig_deardorff_cbc} Deardorff model results (analogous to Fig.~\ref{fig_cbc_energy}) for integrated kinetic energy (left) and spectra (right).}
\end{figure}


\subsection{Vreman (\texorpdfstring{\textct{vreman}}{vreman})}
\label{Vreman_model}

The Vreman eddy viscosity model \cite{Vreman:2004} is an efficient alternative to the dynamic Smagorinsky model (DSM).  In short, the spatial fields for the velocity components are expanded in Taylor series and test filtered analytically, avoiding the expensive test filtering operations required in DSM.  The resulting model is superior to the constant coefficient Smagorinsky model (CSM) because, unlike CSM, with Vreman's model the subgrid dissipation automatically vanishes if the flow is fully resolved by the grid.

\begin{figure}[h]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/vreman_32_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/vreman_32_spectra} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/vreman_64_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/vreman_64_spectra} }
   \end{tabular*}
   \caption[Integrated and spectral energy decay for CBC experiment using Vreman's model]{\label{fig_vreman_cbc} Vreman model results (analogous to Fig.~\ref{fig_cbc_energy}) for integrated kinetic energy (left) and spectra (right).}
\end{figure}


\subsection{Renormalization Group (\texorpdfstring{\textct{rng}}{rng})}
\label{RNG_model}

Renormalization group (RNG) theory \cite{Yakhot:1989} may be used to derive an effective eddy viscosity, $\mu_{\si{eff}} = \mu + \mu_t$, given by the cubic expression:
\begin{equation}
\label{eq:rng}
\mu_{\si{eff}} = \mu\left[1 + H\left( \frac{\mu_s^2 \mu_{\si{eff}}}{\mu^3} - C \right)\right]^{1/3}
\end{equation}
Here, $\mu_s$ is the Smagorinsky eddy viscosity (with $C_s=0.2$) and $H(x)$ is the Heaviside function ($H(x)=x$ if $x>0$, $H(x)=0$ if $x\le0$).  The cutoff constant is tuned to match the high wavenumber modes in the CBC experiment for the $64^3$ case, $C=10$.

\begin{figure}[h]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/rng_32_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/rng_32_spectra} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/rng_64_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/rng_64_spectra} }
   \end{tabular*}
   \caption[Integrated and spectral energy decay for CBC experiment using RNG model]{\label{fig_rng_cbc} RNG model results (analogous to Fig.~\ref{fig_cbc_energy}) for integrated kinetic energy (left) and spectra (right).}
\end{figure}


\subsection{WALE (\texorpdfstring{\textct{wale}}{wale})}
\label{WALE_model}

The WALE (Wall Adapting Local Eddy-viscosity) model of Nicoud and Ducros \cite{Nicoud:1999} was developed as a near-wall eddy viscosity model with the proper scaling behavior without the need for a damping function like Van Driest damping (see \cite{Wilcox:1}).  Details of the model are provided in the FDS Technical Guide \cite{FDS_Math_Guide}.  While WALE is designed for use a near-wall model, WALE can also perform as a bulk flow eddy viscosity model.  Here we confirm the appropriate choice of WALE model constant, $C_{\rm w}=0.60$ in FDS, by performing simulation of decaying isotropic turbulence, as was also performed in \cite{Nicoud:1999}.

\begin{figure}[h]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/wale_32_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/wale_32_spectra} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/wale_64_decay} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/wale_64_spectra} }
   \end{tabular*}
   \caption[Integrated and spectral energy decay for CBC experiment using the WALE model]{\label{fig_wale_cbc} WALE model results (analogous to Fig.~\ref{fig_cbc_energy}) for integrated kinetic energy (left) and spectra (right).}
\end{figure}



\section{Jet Centerline Velocity Decay (\texorpdfstring{\textct{jet}}{jet})}

\textbf{Gregor J\"ager, BFT Cognos GmbH, Germany}\\

\noindent The \textct{jet\_} series in the Validation/Turbulent\_Jet directory tests the ability of subgrid stress closure (turbulence model) to correctly capture the transition from laminar to turbulent flow and subsequent momentum decay for an incompressible jet.

The FDS solution is compared with experimental observations from K\"ummel \cite{Kummel:2007}. In the initial region of the jet, $x<x_0$, the velocity $u$ is constant near the axis and is equal to the velocity at the nozzle orifice ($u_0$). For a rectangular nozzle orifice of height $h = 0.8$ and width $b = 0.8$, the initial length is calculated by
\begin{equation}
x_0 = \frac{h}{m}
\end{equation}
where the mixed number $m$ is between 0.12 and 0.20.

In the transition region, viscous mixing spreads over the entire jet flow and the flow velocity along the axis decreases. The mean flow velocity at the jet centerline $u_{max}(x)$ is calculated by
\begin{equation}
\frac{u_{max}(x)}{u_0} = \frac{x_0}{x}\sqrt{\frac{b}{h}} = \frac{1}{mx} \sqrt{bh}
\end{equation}

Four turbulence models are tested: (1) Constant Smagorinsky (csmag), (2) Dynamic Smagorinsky (dsmag), (3) Deardorff (FDS default), and (4) Vreman.  The results are plotted in Fig.~\ref{fig_jet_decay}. For each model, two grid resolutions are run, corresponding to $h/\delta x = 8$ (colored dashed lines) and $h/\delta x=16$ (colored solid lines).
\begin{figure}[h]
\centering
\includegraphics[width=.8\textwidth]{SCRIPT_FIGURES/jet_decay}
\caption[Jet centerline velocity decay]{Centerline velocity decay for a high Reynolds number jet (Re$_h = 1 \times 10^5$) with a square orifice of side $h$.  FDS results (colored lines) are shown for various turbulence models at two grid resolutions.  For comparison, analytical results (black lines) are shown for two values of the mixing number $m$.}
\label{fig_jet_decay}
\end{figure}



\chapter{Boundary Effects}

Wall flows have long been a challenge for large-eddy simulation (LES) \cite{Baggett:1997,Baggett:1998,Cabot:1995,Pope:2000,Sagaut:2001}.  In spite of their promise and sophistication, practical LES codes are resigned to \emph{model} the wall shear stress as opposed to \emph{resolving} the dynamically important length scales near the wall. FDS uses a log law velocity profile \cite{Pope:2000} for modeling turbulent flow near a wall.

\section{The FDS Moody Chart (\texorpdfstring{\textct{poiseuille}}{poiseuille}, \texorpdfstring{\textct{moody}}{smoothwall}, \texorpdfstring{\textct{z0}}{z0})}
\label{fds_moody_chart}

At a minimum, a wall model should accurately reproduce the mean wall stress for flow in a straight square duct.  We verify that this is true for FDS by reproducing the Moody chart, a plot of friction factor versus Reynolds number for pipe flow \cite{Moody:1944}.

Details of the FDS formulation are given in the Technical Guide \cite{FDS_Math_Guide}.  Here we provide only the salient components of the model necessary for treatment of constant density channel flow. The filtered continuity and momentum equations are:
\begin{equation}
\label{eqn_cont}
\frac{\partial \bar{u}_i}{\partial x_i} = 0 \,\mbox{,}
\end{equation}
\begin{equation}
\label{eqn_mom1}
\frac{\partial \bar{u}_i}{\partial t} + \frac{\partial \bar{u}_i \bar{u}_j}{\partial x_j} = -\frac{1}{\rho} \left[ \frac{\d p}{\d x_i} + \frac{\partial \tilde{p}}{\partial x_i} + \frac{\partial \bar{\tau}_{ij}}{\partial x_j} + \frac{\partial \tau_{ij}^{r}}{\partial x_j} \right]\,\mbox{,}
\end{equation}
where $\tau_{ij}^{r}$ is the deviatoric part of the residual stress tensor.  In this work we specify a constant pressure drop $\d p/\d x$ in the streamwise direction to drive the flow.  The hydrodynamic pressure $\tilde{p}$ is obtained from a Poisson equation which enforces (\ref{eqn_cont}). Details of the model used for the viscous stress at the wall, e.g., $\bar{\tau}_{xz}|_{z=0}$, are provided in the FDS Technical Reference Guide~\cite{FDS_Tech_Guide}.

\subsection{Laminar Results}
\label{laminar}

As verification of the no-slip boundary condition and further verification of the momentum solver in FDS, we perform a simple 2D laminar (Poiseuille) flow calculation of
flow through a straight channel.
The height of the channel is $H=1$ m and the length of the channel is $L=8$ m.
The number of grid cells in the streamwise direction $x$ is $N_x = 8$.  The number of cells in the wall-normal direction $z$ is varied $N_z = \{8,16,32,64\}$.
The fluid density is $\rho = 1.2$ kg m$^{-3}$ and the viscosity is $0.025$ kg m$^{-1}$ s$^{-1}$.
The mean pressure drop is prescribed to be $\d p/ \d x = -1$ Pa m$^{-1}$ resulting in Re$_H \approx 160$.  The (Moody) friction factor $f$, which satisfies
\begin{equation}
\label{eqn_moodyf}
\Delta p = f \frac{L}{H} \frac{1}{2} \rho \bar{u}^2 \,\mbox{,}
\end{equation}
is determined from the steady-state mean velocity $\bar{u}$ which is output by FDS for the specified pressure drop.  The exact friction factor for this flow is $f_{exact} = 24/\mbox{Re}_H$.  The friction factor error $|f-f_{exact}|$ is plotted for a range of grid spacings $\delta z = H/N_z$ in Fig.~\ref{fig_poiseuille_convergence} demonstrating second-order convergence of the laminar velocity field.
\begin{figure}
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/poiseuille_convergence}
\caption[Convergence for laminar (Poiseuille) flow in a 2D channel]{FDS exhibits second-order convergence for laminar (Poiseuille) flow in a 2D channel.}
\label{fig_poiseuille_convergence}
\end{figure}

\subsection{Turbulent Results}
\label{turbulent}

\paragraph{Smooth Walls}

To verify the wall model for turbulent flow we perform 3D LES of a square duct with periodic boundaries in the streamwise direction and a constant and uniform mean pressure gradient driving the flow.  The problem set up is nearly identical to the laminar cases of the previous section except here we perform 3D calculations and maintain cubic cells as we refine the grid: we hold the ratio 8:1:1 between $N_x$\,:\,$N_y$\,:\,$N_z$ for all cases.  The cases shown below are identified by their grid resolution in the $z$ direction.  The velocity field is initially at rest and develops in time to a mean steady state driven by the specified mean pressure gradient.  The presence of a steady state is the result of a balance between the streamwise pressure drop and the integrated stress from the wall model.  FDS outputs the planar average velocity in the streamwise direction and once a steady state is reached this value is used to compute the Reynolds number and the friction factor.  Table \ref{tab_zplus} provides a case matrix: nine cases for three values of specified pressure drop and three grid resolutions.  The nominal Reynolds number (obtained post-run) is listed along with the friction factor from the most refined FDS case and the friction factor computed (iteratively) from the Colebrook equation,
\begin{equation}
\label{eqn_colebrook}
\frac{1}{\sqrt{f}} = -2.0 \log_{10} \left( \frac{s/H}{3.7} + \frac{2.51}{\mbox{Re}_H\sqrt{f}} \right) \,\mbox{,}
\end{equation}
which is a fit to the turbulent range of the Moody chart (for example, see Ref.~\cite{MYO}).  The parameter $s/H$ is the relative
roughness where $H$ is the hydraulic diameter of the pipe or channel and Re$_H$ is the Reynolds number based on $H$.
To provide a qualitative picture of the flow field, Fig.~\ref{fig_channel_flow_setup} shows contours of streamwise velocity
for the case $\d p/\d x = -1$ Pa m$^{-1}$ and $N_z=32$.

\begin{figure}
\centering
\includegraphics[width=4.5in]{FIGURES/channel_flow_setup}
\caption[LES of square duct flow]{LES of square duct flow with smooth walls and periodic streamwise boundaries.  For this image $N_z=32$ and the mean pressure drop is $\d p/ \d x = -1$ Pa m$^{-1}$ resulting in Re$_H = 7.5\times 10^5$ and a friction factor of $f=0.0128$.}
\label{fig_channel_flow_setup}
\end{figure}

\begin{table}
\centering
\caption[Case matrix for Moody chart]{Case matrix and friction factor results for turbulent channel flow with smooth walls. The height of the first grid cell $\delta z$ is given in viscous units $z^+$ for each case.  Additionally, the table gives the nominal Reynolds number Re$_H$ and the FDS friction factor results compared to the Colebrook equation (\ref{eqn_colebrook}).}
\begin{tabular}{|*{9}{l|}}
\hline
$\d p/\d x$   & \multicolumn{3}{c|}{$z^+$} &  Re$_H$  & $f$ FDS  & $f$ Colebrook & Rel. error \\
\hline (Pa/m)           & $N_z=8$          & $N_z=16$          & $N_z=32$          &                   & $(N_z=32)$ & Eq. (\ref{eqn_colebrook}) & \% \\
\hline\hline -0.01      & 190              & 95                & 47                & $5.9\times 10^4$  & 0.0212     & 0.0202   & 4.8                 \\
\hline -1.    & $1.9\times 10^3$ & 950               & 470               & $7.5\times 10^5$  & 0.0128     & 0.0122   & 4.6                 \\
\hline -100.  & $1.9\times 10^4$ & $9.5\times 10^3$  & $4.7\times 10^3$  & $9.8\times 10^6$  & 0.0077     & 0.0081   & 6.0                 \\
\hline
\end{tabular}
\label{tab_zplus}
\end{table}

\paragraph{Rough Walls}

With the same grid set up as described above the smooth walls, a series of cases labeled as \textct{z0}\footnote{The atmospheric community typically uses $z_0$ to denote the roughness height. However, we also use $s$ interchangeably with $z_0$ to conform to the notation used in Pope \cite{Pope:2000}.} in the repository \cite{FDS-SMV_repository} were run at various roughness heights, grid resolutions, and Reynolds numbers. The results are presented together with the smooth wall cases in Fig.~\ref{fig_fds_moody_chart}. The laminar cases provide accurate results for two different Reynolds numbers. Both the smooth wall and rough wall treatments behave well over the range tested.

\begin{figure}[ht]
\centering
\includegraphics[width=4.5in]{SCRIPT_FIGURES/fds_moody_chart}
\caption[FDS Moody chart]{The FDS Moody chart: friction factor, $f$, versus Reynolds number, Re$_H$, based on duct height. The solid line for $\mbox{Re} < 2000$ is the analytical result for 2D Poiseuille flow, $f=24/\mbox{Re}$. The solid lines for $\mbox{Re}>2000$ (from the Colebrook equation (\ref{eqn_colebrook})) are Relative roughness $s/H$ shown on the right axis.}
\label{fig_fds_moody_chart}
\end{figure}



\section{Blasius boundary layer (\texorpdfstring{\textct{blasius}}{blasius})}

\textbf{Hyun-Wook Park and Jung-il Choi, Yonsei University, Seoul, South Korea}\\

\noindent Consider a steady flow over a semi-infinite flat plate aligned with the flow with free stream velocity, $u_0$. The Prandtl boundary layer equations~\cite{Panton:1} are:
\begin{equation}
\label{eqn_BL_momentum}
u \frac{\partial u}{\partial x} + w \frac{\partial u}{\partial z} = \nu \frac{\partial^2 u}{\partial z^2} \,\mbox{,}
\end{equation}
\begin{equation}
\label{eqn_BL_continuity}
\frac{\partial u}{\partial x}+\frac{\partial w}{\partial z} = 0 \,\mbox{.}
\end{equation}
Paul Richard Heinrich Blasius found a solution to Eqs.~(\ref{eqn_BL_momentum}) and (\ref{eqn_BL_continuity}) by introducing a similarity variable:
\begin{equation}
\label{eta}
\eta\equiv\frac{z}{\sqrt{\nu x/u_0}} \,\mbox{.}
\end{equation}
Substituting $\eta$ and the stream function ($u = \partial \psi/\partial z$, $w = -\partial \psi/\partial x$) into Eq.~(\ref{eqn_BL_momentum}) yields the following ODEs:
\begin{eqnarray}
\label{BL_ODE}
\frac{1}{2}f f^{''}+f^{'''}&=&0 \\
u&=&u_0 f^{'} \\
w&=&\frac{1}{2}\sqrt{\frac{\nu \,u_0}{x}}(\eta f^{'}-f)
\end{eqnarray}
The solution of Eq.~(\ref{BL_ODE}) is the Blasius solution~\cite{Panton:1}.

The physical domain of the present verification case is a rectangle with length $L=0.15$ m in the streamwise direction and $H=0.3$ m in the wall-normal direction. The grid spacing is uniform ($\delta x = L/N_x$, $\delta z =H/N_z$) in each direction, and $N_x = 1.5 \, N_z$ with $N_z = \{16, 32, 64\}$ for each test series. The Boundary conditions for the inlet and outlet boundaries are \textct{OPEN} with the dynamic pressure set to zero at the inlet boundary. On the top boundary, the gradient of $w$ in the $z$ direction is zero combined with a free-slip condition that combines to yield an irrotational field. The boundary condition along the bottom of the domain is free-slip upstream of the plate ($x<0.5$ m) and no-slip on the plate. The initial velocity is $1$ m/s and $u_0$ is taken as the value of $u$ at the top boundary since boundary conditions at $z=\infty$ cannot be directly applied. The case is run with constant properties: $\rho=1.2$ \si{kg/m^3}, $\mu = 0.001$ kg/m/s.

Figure~\ref{blasius} (left) shows a comparison of the streamwise velocity from FDS with the Blasius solution. The FDS solution (lines) converges to Blasius (open circles) as the mesh resolution is increased. Figure~\ref{blasius} (right) shows the root mean square (RMS) error, $\varepsilon$, in $u$ (streamwise component) at $x=0.1$ m ($0.05$~m from the leading edge of the plate) for the dimensional Blasius solution. The error is defined by
\begin{equation}
\label{error_l2norm_bl}
\varepsilon \equiv \sqrt{ \frac{1}{N_z} \sum_{k=1}^{N_z} \left[ u_{k} - u_{{\rm B},k} \right]^2 }
\end{equation}
where $k$ is the $z$ index. The value $u_k$ represents the FDS result for $u$ at the staggered grid storage location for cell $k$, $u_{{\rm B},k}$ is the dimensional Blasius solution at the corresponding location. The slight departure from second-order accuracy is likely due to numerical issues in representing the singularity in the Blasius solution at the leading edge of the plate as well as errors in the boundary conditions due to truncation of the domain.
\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/blasius_profile} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/blasius_convergence}
   \end{tabular*}
   \caption[Blasius profile and convergence]{(Left) Comparison of theoretical and numerical results for the Blasius velocity profile ($u$ component). (Right) Error between FDS and Blasius solution for $u(z)$ plotted for each grid resolution.}
   \label{blasius}
\end{figure}



\section{Near-Wall Grid Resolution (\texorpdfstring{\textct{yplus}}{yplus})}

\subsubsection{Abbas Jaber, NIST SURF student}

\noindent The distance from the wall measured in viscous units is called $y^+$. In order to verify that $y^+$ is calculated correctly within FDS, we analyze an example of Poiseuille flow in a square channel with periodic boundaries. The pressure gradient in the $x$-direction, the dynamic viscosity, and the dimensions of the channel are known. This allows us to easily determine the expected values of wall shear stress,
\begin{equation}
\label{wall stress}
\tau_w = - \delta \frac{\d p}{\d x},
\end{equation}
where $p$ is pressure and $\delta$ is half the height of the channel. This, in turn, allows for determining the friction velocity,
\begin{equation}
\label{friction velocity}
u_{\tau} \equiv \sqrt{{\frac{\tau_w}{\rho}}}.
\end{equation}
From here we calculate the exact value of $y^+$ for the given flow,
\begin{equation}
\label{eqn_yplus}
y^+ \equiv \frac{y}{\delta_{\nu}} = \frac{u_{\tau}y}{\nu}.
\end{equation}

In FDS, $\tau_w$ is obtained only from the wall model. The resolution of the wall-normal streamwise velocity gradient increases with  mesh resolution; the value of $y^+$ decreases accordingly. In this verification case, a wall device is used to output $y^+$ for different mesh resolutions in the $z$-direction. $y^+$ is output for a given $\delta z$, height of a cell, $\delta z$ = [1/8, 1/16, 1/32]. Then, the device values obtained are compared with the exact value of $y^+$ for a given mesh resolution (Fig.~\ref{fig_yplus}). An FDS wall device outputs the mid-cell value of the first cell next to the wall, hence, the $z$ value ($y$ in Eq.~(\ref{eqn_yplus})) used to determine the exact $y^+$ varies with $\delta z$ $(z = \delta z/2)$.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/yplus}
\caption[Near-wall grid resolution]{Verification of FDS $y^+$ output for $\delta z=[1/8, 1/16, 1/32]$.}
\label{fig_yplus}
\end{figure}


\section{Heated Channel Flow (\texorpdfstring{\textct{heated\_channel}}{heated\_channel})}

The simulation of turbulent channel flow (Re$_{\tau}=180$) with a heat source was performed to verify the log law near-wall model for heat transfer \cite{FDS_Tech_Guide}. The model was developed based on the law of wall for temperature and empirical equations \cite{Kader:1981}. These cases are located in the Verification/Turbulence subdirectory.

The height of the channel is $H=2$ m, the width is $W=6$ m, and the length is $L=12$ m. There are 64 cells in the streamwise direction ($\delta x = 0.1875$ m) and 32 cells in the spanwise ($\delta y=0.1875$ m) and wall-normal directions ($\delta z=0.0625$ m).  The midpoint of the first cell in viscous units is $z^+ = 5$, which is a very highly resolved LES. For this reason, the dynamic Smagorinsky SGS model is used for the residual stress. Additionally, these cases were run in ``research mode'' (\textct{RESEARCH\_MODE=.TRUE.} on \textct{MISC}), which accounts for both molecular the turbulent transport coefficients, a must for distinguishing between fluids with different molecular Prandtl or Schmidt numbers (here the Re is so low that molecular effects may dominate locally).  The flow is maintained by a mean pressure gradient ($8.748 \times 10^{-6}$ Pa/m) in the streamwise direction. A constant volumetric heat source (0.5 W/m$^3$) is imposed on the fluid. The boundary conditions for momentum equations are no-slip at top and bottom walls and periodic for the streamwise and spanwise directions. The boundary condition for the energy equation is constant temperature ($T_w = 20 \,\mbox{\si{\degree C}} $) at the wall. To evaluate the effects of Prandtl number (Pr) and compare the DNS study \cite{Kim:1987} with FDS, the specific heat ($c_p = 1$ \si{kJ/(kg.K)}) and viscosity ($\mu = 1.8216 \times 10^{-5}$ \si{kg/(m.s)}) are fixed and the conductivity, $k$, of the fluid (air) is adjusted to:
\begin{center}
\begin{tabular}{ll}
Pr & $k$ (\si{W/(m.K)}) \\
\hline
0.10 & $1.82 \times 10^{-1}$ \\
0.71 & $2.59 \times 10^{-2}$ \\
1.00 & $1.82 \times 10^{-2}$ \\
2.00 & $9.11 \times 10^{-3}$
\end{tabular}
\end{center}

In Figure \ref{fig_heated_channel}, FDS results are compared to DNS data for mean streamwise velocity, $u^+ = \langle u \rangle/u_\tau$, and mean temperature, $T^+ = (\langle T \rangle - T_w)/T_\tau$. The temperature scale is given by
\begin{equation}
\label{eqn_friction_temperature}
T_{\tau} \equiv \frac{\langle \dot{q}_w^{''} \rangle}{{\rho}{c_p}{u_{\tau}}} \,\mbox{,}
\end{equation}
where $\langle \dot{q}_w^{''} \rangle$, $\rho$, and $c_p$ are the mean heat flux at the wall, density, and specific heat, respectively.  Fully developed, statistically stationary flow is achieved after approximately 20 flow through times.  Statistics are gathered between 40 and 60 flow through times.

As seen in the left side of Fig.~\ref{fig_heated_channel}, the velocity profile shows good agreement with the DNS result. The near-wall temperature profile for each Pr is shown on the right side of Fig.~\ref{fig_heated_channel}. The mean wall heat flux is correct, as indicated by the accurate result of the first off-wall grid value (in the viscous region). The inaccuracy of the temperature profile in the buffer layer points to a need for improvement in the subgrid-scale (SGS) scalar transport model.
\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/heated_channel_uplus} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/heated_channel_Tplus}
   \end{tabular*}
   \caption[Mean velocity and temperature profiles for heated channel flow]{\label{fig_heated_channel} Comparison of FDS (lines with squares) with DNS (circles) for heated channel flow. (Left) Wall-normal velocity profile compared to DNS of Moser et al.~\cite{Moser:1999}. (Right) Wall-normal mean profiles of temperature for molecular Prandtl numbers (Pr) = 0.10, 0.71, and 2.0, compared to DNS of Kim and Moin~\cite{Kim:1987}.}
\end{figure}




\section{Ribbed Square Duct Flow (\texorpdfstring{\textct{ribbed\_channel}}{ribbed\_channel})}
\label{sec:ribbed_channel}

In this test case, we compare FDS results with particle-image velocimetry (PIV) data from Casara and Arts \cite{Casara:1} for flow in a square duct with a ribbed obstruction.  The rib height is $h = 0.1$ m and the duct height is $D = 0.3$ m.  The distance between ribs in the periodic duct (the ``pitch'') is $10 \, h$.  The length of our domain is therefore 1 m.  The Reynolds number based on $D$ is nominally 40,000 (this is discussed more later). The FDS mesh is uniform in each direction.  We test grid resolutions of $h/\delta x = \{2,4,8,16\}$.

A side view image of mean velocity vectors in the 3D flow is shown in Fig.~\ref{fig_ribbed_channel_image} for the $h/\delta x = 8$ case.  The primary goal of this calculation is to predict the mean recirculation patterns on the windward and leeward side of the rib.  To measure the FDS results, a line of devices (represented by the green dots in the figure) is placed near the floor of the duct.  Where the mean $u$ velocity component changes sign indicates a reattachment location.  Results for the mean streamwise velocity near the surface are shown in the upper-left plot of Fig.~\ref{fig_ribbed_channel}.  The independent axis on the plots ranges from 0 m to 1 m, representing the center to center distance between ribs.  Note that the image is offset and ranges from -0.4 m to 0.6 m.  As can be seen from the plot, the $h/\delta x = 8$ resolution (green sideways triangles) slightly overpredicts the reattachment length, with the zero crossing near $x/h = 4.5$ (note that the correspondence with the vectors in the image).  The finest resolution, $h/\delta x=16$, is sufficient to accurately capture the reattachment zone.

Despite the fact that the coarser cases do not perfectly capture the reattachment region, it is remarkable that with $h/\delta x = 2$ we achieve any recirculation at all.  The wiggles in the solution are due to numerical dispersion error.

The mean streamwise velocity profile at the rib centerline is shown in the upper-right plot of Fig.~\ref{fig_ribbed_channel}.  Here we point out that the setup for this case is basically copied from Loh\'asz et al.~\cite{Lohasz:1}.  Their method of forcing, however, is ambiguous.  Using the FDS \textct{MEAN\_FORCING} feature, we set our bulk velocity to 1 m/s (\textct{U0 = 1.0} on \textct{MISC}) in order to match the mean profile for the finest grid resolution.  All other cases use the same forcing.

The bottom-left and -right plots in Fig.~\ref{fig_ribbed_channel} show the RMS velocity along the duct floor and the center profile above the rib, respectively. As can be seen, the $h/\delta x = 16$ case provides accurate results.  This resolution for this problem corresponds to wall $y^+$ values around 30.

\begin{figure}[ht]
\centering
\includegraphics[width=.8\textwidth]{SCRIPT_FIGURES/ribbed_channel_80_s1000}
\caption[The {\ct ribbed\_channel} test case]{Mean velocity vectors colored by velocity magnitude (red is 2 m/s) for the ribbed square duct case with $h/\delta x = 8$.}
\label{fig_ribbed_channel_image}
\end{figure}

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/ribbed_channel_u_strm} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/ribbed_channel_u_prof} \\
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/ribbed_channel_urms_strm} &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/ribbed_channel_urms_prof} \\
   \end{tabular*}
   \caption[Mean and RMS velocity profiles for ribbed square duct flow]{\label{fig_ribbed_channel} Mean and RMS velocity profiles for ribbed square duct flow. Comparison with PIV data from Casara and Arts \cite{Casara:1,Lohasz:1}.}
\end{figure}



\chapter{Mass and Energy Conservation}


\section{Mass Conservation}

This section describes tests of global mass conservation.

\subsection{Flow of a Gas through a Simple Duct (\texorpdfstring{\textct{simple\_duct}}{simple\_duct})}
\label{simple_duct}

In this example, a closed chamber with a simple recirculating duct is used to demonstrate that a gas such as carbon dioxide can be transported
through multiple meshes and its mass is conserved. An obstruction is created that leaks 0.5~kg of CO$_2$ over a time span of 10~s.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/simple_duct_mass}
\caption[The \textct{simple\_duct} test case]{The mass of CO$_2$ contained in a simple room connected with a recirculating duct.}
\label{simple_duct_fig}
\end{figure}


\subsection{Species Mass Flux (\texorpdfstring{\textct{species\_conservation}}{species\_conservation})}
\label{species_conservation_1}
\label{species_conservation_2}
\label{species_conservation_3}
\label{species_conservation_4}

A specified species mass flux is a commonly used boundary condition, in particular when specifying a fire.  The specified heat release rate per unit area is divided by the heat of combustion, resulting in a specified fuel mass flux, $\dot{m}_\alpha''$, at the surface:
\begin{equation}
\label{eqn_total_flux}
\dot{m}_{\alpha}'' = \rho Y_{\alpha} u_n - \rho D_\alpha \frac{\partial Y_\alpha}{\partial n}
\end{equation}
where $u_n$ is the face normal mass-average velocity and $\partial/\partial n$ is the gradient normal to the face.  The velocity is determined from the total mass flux and the density at the face,
\begin{equation}
\label{eqn_un}
u_n = \frac{\sum_\alpha \dot{m}_\alpha''}{\rho(\mathbf{Y},T)}
\end{equation}
The density is computed using old values of the face mass fractions and the face temperature which may be specified or computed depending on choices made by the user.  The new face mass fraction is then set to satisfy (\ref{eqn_total_flux}).  The test cases below are designed to exercise contributions from both the advective and diffusive terms in this boundary condition.

\subsubsection{Case 1: Low Flux, Hot Gas Injection}

Propane is injected into a 4~m cube with 1~m$^2$ vents on all six faces.  The mass flux is 0.0001~kg/(m$^2\cdot$s) and the surface temperature is 500~\si{\degree C}.  The box is initially filled with air at standard conditions.  The accumulation of propane in the box is shown in Fig.~\ref{species_conservation}.

\subsubsection{Case 2: Air Injection into a Pressurized Compartment}

Air is injected into one of two cubic chambers separated by a solid partition.  The mass flux of air is 1~kg/(m$^2\cdot$s) through a vent that is 0.04~m$^2$ in area. After 25~s, the mass of air introduced should be 1~kg. The accumulation of air in the chamber is shown in Fig.~\ref{species_conservation}.

\subsubsection{Case 3: Gases Released by Solid Phase Reactions within a Solid Obstruction}

A 0.2~m solid cube undergoes a reaction that releases four different gases into a sealed unit cube. The solid has a density of 100~kg/m$^3$. The inert gases have different yields, all summing to one, meaning that the solid cube ought to be vaporized creating a total mass of 0.8~kg. The accumulation of all the gases in the chamber is shown in Fig.~\ref{species_conservation}. Note that in this case, when the solid cube vaporizes, its volume is filled with the background species, nitrogen. The total mass of the newly created nitrogen is 0.0093~kg.

\subsubsection{Case 4: Gases Released by Solid Phase Reactions at the Boundary of the Domain}

This case is similar to Case~3. A 0.2~m by 0.2~m solid surface undergoes a reaction that releases four different gases into a sealed unit cube. The solid has a density of 100~kg/m$^3$ and thickness of 0.1~m. The inert gases have different yields, all summing to one, meaning that the solid surface ought to be vaporized creating a total mass of 0.4~kg. The accumulation of all the gases in the chamber is shown in Fig.~\ref{species_conservation}.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/species_conservation_1} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/species_conservation_2} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/species_conservation_3} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/species_conservation_4}
\end{tabular*}
\caption[The \textct{species\_conservation} test cases]{Results of the \textct{species\_conservation} test cases. Case~1: Hot gas is injected at a very low flow rate into a 4~m cube. Case~2: Air is injected into one side of a partitioned compartment. Case~3: A solid cube vaporizes yielding four gases whose total mass is 0.8~kg. A small amount of nitrogen is created to fill the void left by the vaporized solid cube. Case~4: A patch of solid surface reacts to form four gases whose total mass is 0.4~kg.}
\label{species_conservation}
\end{figure}

\subsection{Mass Flux through Domain Boundaries (\texorpdfstring{\textct{mass\_flux\_wall}}{mass\_flux\_wall})}
\label{mass_flux_wall}

This set of tests considers a specified mass injection of water vapor from a {\ct VENT} on the floor of a compartment.  The entire top of the compartment is {\ct OPEN} to the ambient.  The lighter water vapors are buoyant, so they rise creating a turbulent flow into and out of the domain.  Therefore, the input is steady, while the outflow of water vapor is quite chaotic.  To judge whether a proper mass balance is achieved by FDS we must monitor not only the inflow and outflow, but also the total mass of water vapor in the domain at a given time.  Therefore, we add {\ct DEVC} of quantity {\ct MASS\_FLUX\_WALL} and {\ct STATITSTICS=`SURFACE INTEGRAL`} for inflow and outflow, and we also add {\ct MASS\_FILE=.TRUE.} to the {\ct DUMP} line to monitor the total water vapor at any point in time in the domain.  With $\rho$ and $Y_{\mbox{\tiny H2O}}$ denoting the local mass density and mass fraction of water vapor in a cell, and with $\dot{m}_{\mbox{\tiny H2O}}^{\prime\prime}$ denoting the flux of water vapor at a cell face on the domain boundary, the mass balance may be written as,
\begin{equation}
\label{eq:H2O_mass_balance}
\frac{\mbox{d}}{\mbox{d}t} \left( \int_{V} \rho Y_{\mbox{\tiny H2O}} \,\mbox{d}V \right) + \int_{S_{out}} \dot{m}_{\mbox{\tiny H2O}}^{\prime\prime} \,\mbox{d}S - \int_{S_{in}} \dot{m}_{\mbox{\tiny H2O}}^{\prime\prime} \,\mbox{d}S = 0
\end{equation}

Figure \ref{fig:H2O_mass_balance} shows the results of two cases that test the mass balance of water vapor in the domain just described.  The plot on the left tests lumped species balance.  In this case, the background humidity is set to zero and so the only water vapor in the domain is that of the tracked species injected at the bottom boundary.  In the second test case on the right we are showing the balance for the primitive species water vapor.  In this test, the background humidity is the default (40 \%) and so the output device must sum the water vapor contribution from the background air and the tracked species injected at the bottom.  In each plot, the blue and red lines show the inflow (blue, steady) and outflow (red, turbulent) as well as the balance from Eq.~\ref{eq:H2O_mass_balance} formed from the mass and devices files.  The balance (yellow line) fluctuates slightly around zero because of a first-order time error in reporting the boundary fluxes.  That is, within the actual simulation the mass transport equation is updated using a second-order Runge-Kutta scheme, whereas at the time the output routine is called the code does not have the machinery to perfectly reconstruct the second-order flux terms.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/mass_flux_wall_zindex_mass_balance} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/mass_flux_wall_yindex_mass_balance}
\end{tabular*}
\caption[The \textct{mass\_flux\_wall} test cases]{Results of the \textct{mass\_flux\_wall} test cases.  (Left) Lumped species balance, (Right) primitive species balance.}
\label{fig:H2O_mass_balance}
\end{figure}

\subsection{Checking the Equation of State (\texorpdfstring{\textct{particle\_offgas}}{particle\_offgas})}
\label{particle_offgas_1}
\label{particle_offgas_2}
\label{particle_offgas_3}
\label{particle_offgas_4}

The ``particle offgas'' cases include 100 randomly distributed Lagrangian particles that inject different gas species into an open domain initially filled with air. The aim of these cases is to test whether the gas temperature is maintained at ambient (20~$^\circ$C) in the gas injection cases, and whether the minimum temperature remains at ambient in the cases where fuel is injected and burned.

\subsubsection{Case 1: Lagrangian Particles Blowing Air}

In this case, each particle injects air into the domain, and air is the background species. The temperature is not expected to rise above or drop below ambient, as shown in the upper left of Fig.~\ref{particle_offgas_plots}.

\subsubsection{Case 2: Lagrangian Particles Blowing Carbon Dioxide}

In this case, each particle injects CO$_2$ into the domain, and air is the background species. The temperature is not expected to rise above or drop below ambient, as shown in the upper right of Fig.~\ref{particle_offgas_plots}.

\subsubsection{Case 3: Lagrangian Particles Blowing Propane that Combusts}

In this case, each particle injects propane into the domain, and air is the background species. Combustion is expected, but the gas temperature is not expected to drop below ambient, as shown in the lower left of Fig.~\ref{particle_offgas_plots}.

\subsubsection{Case 4: A Small Solid Obstruction Blowing Propane that Combusts}

In this case, the particles are replaced by a small, solid block blowing propane. Combustion is expected, but the gas temperature is not expected to drop below ambient, as shown in the lower right of Fig.~\ref{particle_offgas_plots}.

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_offgas_1} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_offgas_2} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_offgas_3} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_offgas_4}
\end{tabular*}
\caption[The \textct{particle\_offgas} test cases]{Results of the \textct{particle\_offgas} test cases. Upper left, Case 1: minimum and maximum temperature when air only is injected. Upper right, Case~2: min/max temperature when carbon dioxide is injected into air. Lower left, Case~3: minimum temperature when propane gas is injected and burned. Lower right, Case~4: minimum temperature when propane gas is injected from a solid block and burned. }
\label{particle_offgas_plots}
\end{figure}


\subsection{Realizability of Species Mass Fractions (\texorpdfstring{\textct{realizable\_mass\_fractions}}{realizable\_mass\_fractions})}
\label{realizable_mass_fractions}

In order for species mass fractions to be physically realizable they must all be positive (semi-definite) and sum to unity, $Y_\alpha\ge0$ and $\sum_\alpha Y_\alpha=1$.  In this test case, a simple methane burner is used to test the realizability of mass fractions.  A device is placed near the base of the center of the flame to measure the local mass fractions.  In Fig.~\ref{fig:realizable_mass_fractions} we plot the time history of the mass fractions for Fuel, Air, and Products along with the sum (dashed line).  This sum should remain perfectly one at all times.
\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/realizable_mass_fractions}
\caption[The \textct{realizable\_mass\_fractions} test case]{Results of the \textct{realizable\_mass\_fractions} test case.  The sum of the mass fractions (dashed line) should remain perfectly one at all times.}
\label{fig:realizable_mass_fractions}
\end{figure}




\section{Energy Conservation}

FDS does not explicitly solve the energy conservation equation. Instead, mass transport equations are solved for the the $n$ independent gas species.  The density is found from summing the individual gas species densities, $\rho = \sum_\alpha \rho_\alpha$. Source terms from the energy equation are incorporated in the velocity  divergence, $\nabla \cdot \bu$, which is factored out of the sensible enthalpy transport equation, i.e.,
\be
\label{eqn_new_div}
\nabla\cdot\mathbf{u} = \frac{1}{\rho h_{\rm s}} \left[ \frac{\mbox{D}}{\mbox{D} t}(\bar{p}-\rho h_{\rm s}) + \dot{q}^{\prime\prime\prime} + \nabla\cdot(k \nabla T) - \nabla\cdot\sum_\alpha h_{s,\alpha} \mathbf{J}_\alpha - \nabla\cdot\dot{\mathbf{q}}_r^{\prime\prime} + \dot{q}_b^{\prime\prime\prime} \right] \,\mbox{.}
\ee
Here $\rho$ is the mass density, $h_{\rm s}$ is the sensible enthalpy, $\bar{p}$ is the thermodynamic pressure, $\dot{q}^{\prime\prime\prime}$ is the chemical heat release, $k$ is thermal conductivity, $\mathbf{J}_\alpha$ is the diffusion flux vector, $\dot{\mathbf{q}}_r^{\prime\prime}$ is the radiant heat flux vector, and $\dot{q}_b^{\prime\prime\prime}$ is the bulk heat source due to convective heat transfer to Lagrangian particles and the heat associated with mass sources. The divergence is a fairly complicated expression, and it is important that it is computed properly to ensure global energy conservation. The examples in this section check that mass and energy are conserved for relatively simple configurations.

\subsection{The Heat from a Fire (\texorpdfstring{\textct{energy\_budget}}{energy\_budget})}
\label{energy_budget_walls}
\label{energy_budget_adiabatic_walls}
\label{energy_budget_cold_walls}

For the purpose of verifying that the basic FDS algorithm is energy conserving, it is useful to think of a single compartment as a control volume into which energy is generated by a fire and out of which energy either flows via openings or is conducted through the walls. If the fire's heat release rate (HRR) is steady, eventually the system will reach a quasi-steady state (in an LES calculation, there is never a true ``steady state''). Two simple cases, called \textct{energy\_budget\_adiabatic\_walls} and \textct{energy\_budget\_cold\_walls}, illustrate that in the quasi-steady state, the energy generated by the fire is conserved. For the case with adiabatic walls, a 1200~kW fire is simulated within a compartment that is 10~m by 10~m by 5~m tall. There is a single door and a single horizontal vent in the ceiling. The walls are assumed to be adiabatic; that is, there is no net heat flux through them. Another way to look at it is that the walls are perfect insulators. To simplify the case even further, the radiation transport algorithm is turned off. It is expected that in this case 1200~kW ought to flow out of the compartment either via the door or ceiling vent. The plot in Fig.~\ref{energy_budget_adiabatic_walls_fig} shows both the HRR and enthalpy flow out of the compartment converging to 1200~kW. During the warm up phase, the enthalpy flow is less than the HRR because energy is consumed heating up the air within the room.

Next, the same compartment with the same fire is now assumed to have cold (20~\si{\degree C}) walls, and the radiation is switched back on. After a few minutes of simulation, the net enthalpy outflow is approximately 470~kW and the heat losses to the wall (both radiative and convective) are approximately 730~kW. The plot is shown in Fig.~\ref{energy_budget_cold_walls_fig}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/energy_budget_adiabatic_walls}
\caption[The {\ct energy\_budget\_adiabatic\_walls} test case]{The energy budget for a simple compartment fire with adiabatic walls.}
\label{energy_budget_adiabatic_walls_fig}
\end{figure}

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/energy_budget_cold_walls}
\caption[The {\ct energy\_budget\_cold\_walls} test case]{The energy budget for a simple compartment fire with cold walls.}
\label{energy_budget_cold_walls_fig}
\end{figure}


\subsection{Gas Injection via an Isentropic Process (\texorpdfstring{\textct{isentropic}}{isentropic})}
\label{isentropic}

This example checks that if nitrogen is added to a sealed compartment with adiabatic (i.e., no heat loss) walls, that the density, pressure and temperature ought to rise according to the ideal gas law for an isentropic process: \be \frac{p_2}{p_1} = \left( \frac{\rho_2}{\rho_1} \right)^\gamma = \left( \frac{T_2}{T_1} \right)^{\frac{\gamma}{\gamma-1}}  \ee The subscripts 2 and 1 refer to the final and initial state, respectively. Nitrogen is a diatomic gas for which $\gamma=1.4$. As an additional check, the nitrogen is injected at two different rates such that in Case A the injection occurs in 10~s and in Case B the injection occurs in 50~s. The nitrogen is introduced into the domain via small spheres that do not generate or absorb heat. They do not occupy volume either. They just inject the nitrogen at a specified rate into the particular grid cell that each occupies.  Results are plotted in Fig.~\ref{isentropic_fig}.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic_density} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic_pressure} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic_temperature} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic_enthalpy}
\end{tabular*}
\caption[The \textct{isentropic} test case]{Density, pressure, temperature, and enthalpy rise due to the injection of nitrogen into a sealed compartment.}
\label{isentropic_fig}
\end{figure}


\subsection{Gas Injection via a Non-Isentropic Process (\texorpdfstring{\textct{isentropic2}}{isentropic2})}
\label{isentropic2}

This example checks that if a given mass of nitrogen is added via an external vent to a sealed compartment with adiabatic (i.e., no heat loss) walls, that the density, pressure and temperature ought to rise to the same values regardless of the duration of the injection time.  The results are plotted in Fig.~\ref{isentropic2_fig}. In the two cases, 0.2~kg of N$_2$ are added to a compartment that is 1~m$^3$ in volume. In the first case, the injection occurs in 10~s, in the second case in 50~s. The temperature of the gas in both cases is 500~\si{\degree C}. It is expected that the pressure, $p$, should rise at the rate:
\be
   \frac{\d p}{\d t} = \frac{\gamma \, p \, u \, A}{V}
\ee
where $u$ is the injection velocity and $A$ is the area of the vent, 0.04~m$^2$. The density of the incoming N$_2$ is found from the equation of state:
\be
   \rho = \frac{ \overline{W} \, p }{ \R T}
\ee
The injection velocity is the mass flux divided by the density, $u=\dot{m}''/\rho$, in which case, the pressure rise can be written
\be
   \frac{\d p}{\d t} = \frac{\gamma \, \dot{m}'' \, \R T \, A}{\overline{W} \, V}
\ee
Note that the rate of pressure rise is constant. In both the fast and slow injection cases, the pressure is expected to rise 64,253~Pa above ambient. The density and temperature rise are also linear. The density increases from 1.165~\si{kg/m^3} to 1.365~\si{kg/m^3}. The temperature increases from 20~\si{\degree C} to 135.7~\si{\degree C}. The change in the internal energy of the system, based on the mass and temperature of the added N$_2$, is:
\be
   \Delta E = (0.2 \; \hbox{kg}) \times (1.039 \; \hbox{\si{kJ/(kg.K)}}) \times (773.15 \; \hbox{K} ) = 160.6 \; \hbox{kJ}
\ee
Adding in the work due to the pressure yields the change in total enthalpy:
\be
   \Delta H = \Delta E + V \, \Delta P = 160.6 \; \hbox{kJ} + (1 \; \hbox{m}^3) \times ( \; 64.3 \; \hbox{kJ/m}^3) = 224.9 \; \hbox{kJ}
\ee

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic2_density} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic2_pressure} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic2_temperature} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/isentropic2_enthalpy}
\end{tabular*}
\caption[The \textct{isentropic2} test case]{Density, pressure, temperature, and enthalpy rise due to the injection of nitrogen into a sealed compartment.}
\label{isentropic2_fig}
\end{figure}



\subsection{Mixing Gases (\texorpdfstring{\textct{energy\_budget\_dns}}{energy\_budget\_dns})}
\label{energy_budget_dns_100}

In this example, two fictitious gases are forced through tiny ducts (1~mm by 1~mm) that meet at a T-joint. The cross sectional areas of all the ducts are the same. Gas~1 has an initial temperature of 606.3~\si{\degree C} and a constant specific heat of 1~\si{kJ/(kg.K)}. Gas~2 has an initial temperature of 20~\si{\degree C} and a constant specific heat of 10~\si{kJ/(kg.K)}. Both gases have a molecular weight of 29~g/mol and a mass flow of $1 \times 10^{-8}$~kg/s. Typically gases of the same molecular weight have comparable, but not necessarily the same, specific heats. This is an extreme case. In steady state, it is expected that the convection and diffusion of enthalpy at the boundaries will be equal:
\be \int h_{\rm s} \, \rho \bu \cdot \d\bS = \sum_\alpha \int h_{s,\alpha} \, \rho D_\alpha \nabla Z_\alpha \cdot \d\bS \ee
where $Z_\alpha$ is the mass fraction of species $\alpha$.  The plot at left in Fig.~\ref{energy_budget_dns} shows the convective and diffusive enthalpy fluxes at steady state. The quantities are of opposite sign because both quantities are evaluated as source terms in the energy budget.

Because of the large difference in specific heats, the average velocity of the gas mixture flowing out, $U_3$, is not simply the sum of the velocities at the two inlets, $U_1+U_2$. In fact, in order to have the proper enthalpy flow at the outlet, the volume integral of the divergence should be:
\be \int \nabla \cdot \bu \; \d V \equiv -A \, (U_1 + U_2 - U_3) = -A \, \frac{ (U_1-U_2) \, (c_{p,2}-c_{p,1}) }{ c_{p,1}+c_{p,2} } = -1.357 \times 10^{-8} \; \hbox{m}^3/\hbox{s} \label{div2} \ee
The plot at right in Fig.~\ref{energy_budget_dns} shows the resulting and integrated divergence or net volume flow.

\begin{figure}[ht]
\includegraphics[height=2.2in]{SCRIPT_FIGURES/energy_budget_dns_heat}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/energy_budget_dns_div}
\caption[The \textct{energy\_budget\_dns} test case]{(Left) Equality of convective and diffusive enthalpy flux at steady state. (Right) The integrated divergence or net volume flow.}
\label{energy_budget_dns}
\end{figure}



\subsection{Mixing with Variable Specific Heats (\texorpdfstring{\textct{energy\_budget\_tmix}}{energy\_budget\_tmix})}
\label{energy_budget_tmix}

This case tests the ability of FDS to properly account for temperature dependent specific heats.  A coarse 2D channel mixing case is presented where hot gas at 900 \si{\degree C} with a constant specific heat of $c_p=1$ \si{kJ/(kg.K)} enters from the bottom left vent with a flux of 1 \si{kg/(m^2.s)} and cold gas at 20 \si{\degree C} with a constant specific heat of $c_p=10$ \si{kJ/(kg.K)} enters from a top left vent with the same mass flux.  The gases mix in a center channel and exit the domain flowing to the right.

The enthalpy of the mixture at the outlet is $1 \times 1 \times (900+273.15) + 1 \times 10 \times (20+273.15) = 4104.65$ \si{kJ/(m^2.s)}.  The mixture heat capacity at the outlet is 5.5 \si{kJ/(kg.K)} and the flux is 2 \si{kg/(m^2.s)}.  Therefore the outlet temperature is $4104.65/2/5.5 - 273.15 = 100$ \si{\degree C}.
\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/energy_budget_tmix}
\caption[The \textct{energy\_budget\_tmix} test case]{\label{fig_outlet_temperature} Outlet temperature for \textct{energy\_budget\_tmix} case.  Black circles represent the correct result of 100 \si{\degree C}.}
\end{figure}


\subsection{Solid phase energy conservation (\texorpdfstring{\textct{energy\_budget\_solid}}{energy\_budget\_solid})}
\label{energy_budget_solid}

This case tests the ability of FDS to properly conserve the total of the solid phase and the gas phase energy.  A 1 \si{m^3} box is filled with 1 kg of a gas with a specific heat of 1 \si{kJ/(kg.K)}, a molecular weight of 28 g/mol, and an initial temperature of 20 \si{\degree C}.  All the walls, except the floor, are adiabatic.  The floor is defined as a 1 mm thick layer of a material with a conductivity of 100 \si{W/(m.K)},  a specific heat of 1 \si{kJ/(kg.K)}, an initial temperature of 150 \si{\degree C}, and a density of 1,000 \si{kg/m^3}.  The initial enthalpy is $1 \times 1 \times (20+273.15) + 1 \times 1 \times (150+273.15)  =  716.3$ kJ.  At the end state, the gas will have risen in temperature, the solid will have decreased in temperature, and the pressure will have risen.  Since energy is conserved this occurs at a temperature of 96.3 \si{\degree C}.  The final enthalpy is $1 \times 1 \times (96.3+273.15) + 1 \times 1 \times (96.3+273.15) + 22670 / 1000  =  716.3$ kJ.

\begin{figure}[ht]
\includegraphics[height=2.2in]{SCRIPT_FIGURES/energy_budget_solid_T}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/energy_budget_solid_P}
\caption[The \textct{energy\_budget\_solid} test case]{\label{fig_solid_energy} Outputs of temperature (left) and pressure (right) for the \textct{energy\_budget\_solid} case.  Circles represent the correct result.}
\end{figure}


\subsection{Energy Conservation at Walls (\texorpdfstring\textct{mass\_heat\_wall\_device\_test}{mass\_heat\_wall\_device\_test})}
\label{mass_heat_wall_device_test}
\label{mass_heat_wall_device_test_2}

To obtain tight mass and energy balances it is important to output the actual values used for boundary conditions in the transport equations in FDS.  To do this a user applies the WALL variants of the flow devices.  In Fig.~\ref{mass_heat_wall_device} we show the results for two cases.  These cases are the same except that the vents have opposite {\ct IOR} (orientation) values.  Each case has a prescribed outflow mass flux of 1 \si{kg/(m^2.s)} and exhaust vent area of 4 \si{m^2}.  The inflow balances the outflow with both equal to 4 \si{kg/s}.  The specific heat of the air is set to 1 \si{kJ/(kg.K)}.  The ambient temperature is 100 \si{\degreeCelsius}.  The reference temperature is 25 \si{\degreeCelsius}.  The heat flow at the vent is, therefore, (4 \si{kg/s})(1 \si{kJ/(kg.K)})(75 K) = 300 kW.

\begin{figure}[p]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_massflow_in} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_massflow_out} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_massflow_in_2} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_massflow_out_2} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_heatflow_in} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_heatflow_out} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_heatflow_in_2} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/wall_device_test_heatflow_out_2}
\end{tabular*}
\caption[The \textct{mass\_heat\_wall\_device\_test} cases]{The \textct{mass\_heat\_wall\_device\_test} cases.}
\label{mass_heat_wall_device}
\end{figure}


\chapter{Checking for Coding Errors}

This chapter presents a number of cases that are designed to check whether or not various algorithms have been programmed properly. A good way to do this is to simulate simple flows, particularly ones with symmetric features. Errors in coding are easily identified in such cases.

\section{Symmetry Tests}

These examples are very simple test cases that are used to determine if there are coding errors in the basic flow solver. In the absence of a small amount of ``noise'' that FDS uses to initialize the velocity field, a symmetric geometry ought to produce symmetric patterns of velocity, temperature, etc.

\subsection{Counter-Flowing Jets (\texorpdfstring{\textct{symmetry\_test}}{symmetry\_test})}
\label{symmetry_test}
\label{symmetry_test_mpi}

A closed box, 1~m on a side, has 6 injection vents, one centered on each face. Air is pumped into the box at a steady rate. Anything that might lead to an asymmetry in the flow field is turned off, for example, gravity, atmospheric stratification, natural convection, and random noise. One case is performed on a single mesh; the other on multiple meshes. The cases are not identical. The resulting flow fields are shown at the left in Fig.~\ref{symmetry_test_fig}. On the right are plots of the three components of velocity at equidistant corners of the enclosure. Ideally, there should be two equal and opposite time histories of the three components. Even the slightest error in coding will throw this off almost immediately.

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/symmetry_test} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/symmetry_test_plot} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/symmetry_test_mpi} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/symmetry_test_mpi_plot}
\end{tabular*}
\caption[The \textct{symmetry\_test} cases]{Flow field (left) and velocity component plots (right) for the \textct{symmetry\_test} cases.}
\label{symmetry_test_fig}
\end{figure}

\subsection{Fire in a Thin-Walled Pan (\texorpdfstring{\textct{symmetry\_test\_2}}{symmetry\_test\_2})}
\label{symmetry_test_2}

In this case, a steel pan is placed inside a small compartment with a small door at one end. The pan has thin walls (zero cells thick) which is particularly challenging for a symmetry test because boundary conditions must be applied on opposite sides of the thin wall. The case also involves a fire and multiple species. Radiation is not tested here. Figure~\ref{symmetry_test_2_fig} displays the temperature field in a slice plane across the pan, and at two points equidistant from the centerline.


\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/symmetry_test_2} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/symmetry_test_2_plot}
\end{tabular*}
\caption[The \textct{symmetry\_test\_2} case]{Flow field (left) and temperature plot (right) for the \textct{symmetry\_test\_2} case.}
\label{symmetry_test_2_fig}
\end{figure}



\subsection{Axial symmetry (\texorpdfstring{\textct{cyl\_test}}{cyl\_test})}
\label{cyl_test}

FDS has an option to perform an axially-symmetric calculation, which can be useful for simulating a laminar diffusion flame, like a bunsen burner or candle. When invoking this option, the user still specifies three coordinates, $x$, $y$, and $z$, but it is understood that $x$ is the radial coordinate, $r$, and $z$ is the vertical coordinate. The coordinate, $y$, is used only by Smokeview to draw the domain, and it should not influence the calculation at all. However, since FDS is primarily a three-dimensional, cartesian code, there is a possibility that a coding error might cause the specification of the $y$ dimension to have an effect on the result. Figure~\ref{cyl_test_fig} displays results of two sets of axially-symmetric simulations. On the left is an LES simulation in which the lateral size of the cells, $\delta y$, is 2~mm and 2~cm. The two curves ought to lie exactly upon each other, which is indicated by a single red curve. On the right is a DNS simulation of a laminar diffusion flame, with $\delta y$ equal to 2~mm and 4~mm.

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/cyl_test} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/cyl_test_3-4}
\end{tabular*}
\caption[The \textct{cyl\_test} test cases]{Temperature traces from axially-symmetric calculations with different values of $\delta y$.}
\label{cyl_test_fig}
\end{figure}

\section{Velocity boundary condition implementation (\texorpdfstring{\textct{velocity\_bc\_test}}{velocity\_bc\_test})}
\label{velocity_bc_test}

In this example, a simple jet is created by pushing air through a square duct. The obstructions forming the duct are built three different ways. The first way is to build the duct with thin (zero cell thick) plates. The second is to carve the duct out of a solid block. The third way is to build the duct out of one cell thick plates. The three approaches are illustrated in Fig.~\ref{velocity_bc_test_image}. Ideally, the three jets ought to be exactly the same, but subtle differences in the pressure solution and the random generation of noise lead to three unique flow patterns that are only the same in a time-averaged sense. To test this, the centerline pressure and velocity are recorded for a 2~m/s jet emanating from a 0.8~m square duct that is 5~m long. The grid resolution is fairly crude (0.2~m) because the purpose of this exercise is to show that the steady-state velocity and pressure profiles are essentially the same. Figure~\ref{velocity_bc_test_plot} displays the profiles. The curves ought to overlap each other. Errors in the implementation of the velocity boundary conditions are likely to throw the three cases out of alignment.

\begin{figure}[!ht]
\centering
\includegraphics[width=\textwidth]{SCRIPT_FIGURES/velocity_bc_test}
\caption[Images of the \textct{velocity\_bc\_test} test case]{Time-averaged contours of velocity for the \textct{velocity\_bc\_test} case.}
\label{velocity_bc_test_image}
\end{figure}

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/velocity_bc_test_pres} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/velocity_bc_test_vel}
\end{tabular*}
\caption[The \textct{velocity\_bc\_test} test case]{Centerline time-averaged pressure (left) and velocity (right) profiles for the \textct{velocity\_bc\_test} case.}
\label{velocity_bc_test_plot}
\end{figure}


\section{Checking the divergence constraint}
\label{divergence_test}

The test cases in this section involve the divergence of the flow, $\nabla \cdot \bu$, an important quantity in the low Mach number formulation of the Navier-Stokes equations.

\subsection{Isothermal flow (\texorpdfstring{\textct{divergence\_test\_1}}{divergence\_test\_1})}
\label{divergence_test_1}

In the first example, air is pushed through a 1~m cube at a speed of 1~m/s. The air is extracted at the same rate, and there should be no pressure rise and the flow should remain divergence free. There are also a few obstructions that are created and removed during the simulation to check that this does not cause any errors. The left hand plot of Fig.~\ref{divergence_test_fig} displays the minimum and maximum divergence as a function of time. These ought to remain below approximately $1 \times 10^{-10}$~s$^{-1}$ in absolute value.

\subsection{Sealed compartment (\texorpdfstring{\textct{divergence\_test\_2}}{divergence\_test\_2})}
\label{divergence_test_2}

In the second example, air is introduced into a sealed compartment at a steady rate via a single solid Lagrangian particle. In other words, the air is not introduced at the boundary, but rather within the center of the compartment. The pressure, density, and temperature increase, but the volume integral of the divergence remains zero according to the Divergence Theorem:
\be
   \int_\Omega \nabla \cdot \bu \, \d V = \int_{\partial \Omega} \bu \cdot \d \bS = 0
\ee
The right hand plot of Fig.~\ref{divergence_test_fig} displays the volume integral of the divergence as a function of time. This ought to remain within machine accuracy, certainly less than $1 \times 10^{-10}$~m$^3$/s in absolute value.

\begin{figure}[!ht]
\includegraphics[height=2.2in]{SCRIPT_FIGURES/divergence_test_1}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/divergence_test_2}
\caption[The \textct{divergence\_test} cases]{Minimum and maximum divergence for the \textct{divergence\_test} cases.}
\label{divergence_test_fig}
\end{figure}

\section{Multi-mesh Pressure and Temperature Lapse (\texorpdfstring{\textct{lapse\_rate}}{lapse\_rate})}
\label{lapse_rate}

A 10 m x 10 m x 40 m volume is initialized with {\ct LAPSE\_RATE=-0.01}.  The volume is divided vertically into four equal meshes with each mesh having a 10 cm grid resolution.  There should be a smooth drop in both temperature and pressure that matches the analytic values, as shown in Fig.~\ref{lapse_rate_fig}.

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/lapse_rate_T} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/lapse_rate_P}
\end{tabular*}
\caption[The \textct{lapse\_rate} test case]{Centerline temperature (left) and pressure (right) profiles for the \textct{lapse\_rate} case.}
\label{lapse_rate_fig}
\end{figure}


\section{Randomly Overlapping Meshes (\texorpdfstring{\textct{random\_meshes}}{random\_meshes})}
\label{random_meshes}

In most FDS simulations, multiple meshes are positioned adjacent to each other to allow two-way communication. However, in some instances, meshes need to overlap, and this case verifies the functionality of meshes that overlap in a variety of ways. It is a 2-D case that runs fast and is easy to visualize. There are five overlapping meshes shown at left in Fig.~\ref{random_meshes_fig}. Air is blown in at the bottom and exhausted via an open vent at the top. The volume flow rate is fixed at 0.012~m$^3$/s, and the plot at right in Fig.~\ref{random_meshes_fig} verifies that the simulation matches to within a few percent. The case uses the default normal velocity tolerance at solid and interpolated boundaries; thus, there is some error expected in the volume flow due to the solution of the Poisson equation. As a further check that the mesh allocations are being properly handled, there is a fine mesh embedded within the coarse, and the case is run with four MPI processes rather than five.

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/random_meshes.png} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/random_meshes.pdf}
\end{tabular*}
\caption[The \textct{random\_meshes} test case]{Five overlapping meshes (left) and the net volume flow through the domain (right).}
\label{random_meshes_fig}
\end{figure}


\section{Spurious Obstruction Effects (\texorpdfstring{\textct{hole}}{hole})}
\label{hole}

It is not uncommon for subtle differences between two nearly identical input files to lead to noticeable results in the simulation output. In this particular case, a {\ct HOLE} in an obstruction that was set to never open still led to slightly different results when compared to a case with no {\ct HOLE}. The reason for the difference was attributed to slightly different boundary conditions at the edge of the {\ct HOLE}. The problem has been fixed, as confirmed by Fig.~\ref{hole_fig}.

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/hole_no_hole}
\caption[Results of the \textct{hole/no hole} test case]{Heat release rates of two nearly identical calculations.}
\label{hole_fig}
\end{figure}


\section{OpenMP Thread Checking (\texorpdfstring{\textct{race\_test}}{race\_test})}
\label{race_test}

OpenMP is used in FDS to sub-divide the work of the do-loops among multiple cores belonging to the same processor. Figure~\ref{race_test_fig} displays temperature and velocity traces from two calculations, one using one OpenMP thread and one using four. The results of the two calculations ought to be identical, in which case the respective pairs of temperature and velocity traces ought to completely overlap.

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/race_test_tmp} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/race_test_vel}
\end{tabular*}
\caption[Result of the \textct{race\_test}]{Temperature and velocity time histories of two calculations that use different numbers of OpenMP threads. The traces ought to be identical.}
\label{race_test_fig}
\end{figure}


\section{Multi-Mesh Layer Height Calculation (\texorpdfstring{\textct{layer}}{layer})}
\label{layer}

The test cases called {\ct Miscellaneous/layer\_1mesh.fds} and {\ct layer\_4mesh.fds} simulate a fire in a small compartment where the average smoke layer height and temperature are calculated. Figure~\ref{race_test_fig} displays the results for both cases. Note that the 4 mesh case is run on 3 MPI processes to ensure that the layer calculation works for an arbitrary number of meshes and MPI processes.

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/layer_height} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/layer_temps}
\end{tabular*}
\caption[Result of the \textct{layer} test cases]{Average layer height (left) and temperatures (right) for simulations on 1 mesh and 4 meshes.}
\label{layer_fig}
\end{figure}




\chapter{Thermal Radiation}

There are numerous examples in the heat transfer literature of exact solutions, for simple configurations of hot and cold objects, of the radiation transport equation. This chapter presents a number of these examples, plus others aimed at assessing the influence of absorptive media.

\section{Radiation View Factors (\texorpdfstring{\textct{plate\_view\_factor}}{plate\_view\_factor}) }
\label{plate_view_factor}

These verification cases test the computation of radiative heat flux from a hot plate to a target surface 1~m away in different coordinate systems. The radiating surface is at 1000~\si{\degree C} and has an emissivity of 1.0.  The exact values are calculated using the analytical expressions for the view factors.
\begin{center}
\begin{tabular}{|l|l|c|}
\hline Co-ordinates & Radiation source & Heat flux (kW/m$^2$)  \\ \hline \hline
2D Cartesian   & Infinite plate of width 2 m   & 105.3 \\
3D Cartesian   & Square plate of width 2 m     & 81.8 \\
2D cylindrical & Circular disk of diameter 2 m & 74.1 \\ \hline
\end{tabular}
\end{center}
A comparison of exact values and FDS predictions at three different angular resolutions is shown in Fig.~\ref{fig_plate_view_factor}.
\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/plate_view_factor}
\caption[The {\ct plate\_view\_factor} test case]{Convergence study showing increased accuracy of radiative transport equation with increasing number of angles.}
\label{fig_plate_view_factor}
\end{figure}



\section{Radiation inside a Box (\texorpdfstring{\textct{radiation\_box}}{radiation\_box}) }
\label{radiation_in_a_box}
\label{radiation_box}

This verification case tests the computation of three-dimensional configuration factor $\Phi$ inside a cube box with one hot wall and five cold (0~K) walls. An overview of the test geometry is shown in Fig.~\ref{fig_box_radiation}.
\begin{figure}[ht]
\centering
\includegraphics[width=4.0in]{FIGURES/box}
\caption{\label{fig_box_radiation} Radiation inside a box geometry.}
\end{figure}
The configuration factors are calculated at the diagonal of the cold wall opposite to the hot wall. The exact values of the configuration factor from plane element $\d A$ to parallel rectangle $H$ are calculated using the analytical solution~\cite{Siegel:1}
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline ($y,z$) & $\Phi_{H \d A}$ & ($y,z$) & $\Phi_{H \d A}$ \\ \hline \hline
0.025   &0.1457 & 0.275 &0.2135 \\
0.075   &0.1603 & 0.325 &0.2233 \\
0.125   &0.1748 & 0.375 &0.2311 \\
0.175   &0.1888 & 0.425 &0.2364 \\
0.225   &0.2018 & 0.475 &0.2391 \\ \hline
\end{tabular}
\end{center}
Different variations of the case include the mesh resolution (20$^3$ and 100$^3$ cells) and the number of radiation angles (50, 100, 300, 1000, 2000). The exact and FDS results are shown in Fig.~\ref{fig_incident_heat_flux}.

\begin{figure}[ht]
\centering
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiation_box_20} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiation_box_100}
\end{tabular*}
\caption{Incident heat flux.}\label{fig_incident_heat_flux}
\end{figure}


\section{Radiation from a Polygonal Plate (\texorpdfstring{\textct{radiating\_polygon}}{radiating\_polygon}) }
\label{radiating_polygon}

This example is similar to the one presented in Section~\ref{radiation_in_a_box}, except now the radiating plate is a polygon with sides of even length. The incident radiation heat flux from an $n$-sided polygon with temperature, $T=1000$~$^\circ$, is given by the formula~\cite{Siegel:1}:
\be
   \dq_{\rm r}'' = \sigma \, T^4 \, \frac{n \, H}{\pi \, \sqrt{1+H^2}} \; \tan^{-1} \sqrt{\frac{R^2-H^2}{1+H^2}} \quad ; \quad H=\frac{h}{l} \quad ; \quad R=\frac{r}{l}
\ee
where $h$ is the distance from the center of the polygon to the center point of any of its sides, $r$ is the distance from the center to any vertex, and $l$ is the distance from the center to the target surface along a perpendicular line. Figure~\ref{radiating_polygon_figure} displays calculations performed with a range of grid and angular resolutions. Note that the number of angles used to solve the RTE is quadrupled when the number of grid cells in each coordinate direction is doubled.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiating_polygon_square}
\caption[The {\ct radiating\_polygon} test case]{Incident heat flux from a hot square plate as a function of distance to the center of the plate.}
\label{radiating_polygon_figure}
\end{figure}



\section{Radiation from a Layer of Hot Gas (\texorpdfstring{\textct{radiation\_plane\_layer}}{radiation\_plane\_layer})}
\label{radiation_plane_layer}

This case tests the computation of three-dimensional radiation from a homogeneous, infinitely wide layer of hot gases.  The temperature of
the layer is 1273.15~K and the absorption coefficient, $\kappa$, is varied. The thickness of the layer is fixed at 1~m, and the optical depth is $\tau = (1 \, \kappa)$.
Wall temperatures are set to 0~K. The results are compared against the exact solution $S(\tau)$ presented in~\cite{Zeldovich:1}
\be S(\tau) = S_b\left[1-2E_3(\tau)\right] \ee
where $S_b = \sigma T^4$ is the black-body heat flux from the radiating plane and $E_3(\tau)$ is the exponential
integral function (order 3) of the optical depth $\tau$.

The FDS results are computed at two mesh resolutions in the $x$-direction ($I=20$ and $I=150$). For $I=20$, both one-band and six-band versions are
included to test the correct integration of heat fluxes over multiple bands. For $I=20$, 2-D versions are also computed ($J=1$). The limiting case, $\tau=\infty$,
using a solid wall of temperature 1273.15~K, is computed to test the wall heat flux computation. The exact values and FDS predictions of
the wall heat fluxes are given in the table below.

\IfFileExists{SCRIPT_FIGURES/radiation_plane_layer.tex}{\input{SCRIPT_FIGURES/radiation_plane_layer.tex}}{\typeout{Error: Missing file SCRIPT_FIGURES/radiation_plane_layer.tex}}


\section{Wall Internal Radiation (\texorpdfstring{\textct{wall\_internal\_radiation}}{wall\_internal\_radiation}) }
\label{wall_internal_radiation}

In-depth absorption of thermal radiation in a solid is computed using a two-flux model.  In this example, the accuracy of the two-flux model is tested in the computation of the emissive flux from a homogeneous layer of material (thickness $L=$~0.1~m) at 1273.15~K temperature, surrounded by an ambient temperature of 1~K. The absorption coefficient $\kappa$ is varied to cover a range [0.01, 10] of optical depth $\tau = \kappa L$.

The exact solutions for radiative flux are the analytical solutions of plane layer emission~\cite{Zeldovich:1}
\be
   S(\tau) = S_b\left[1-2E_3(\tau)\right]
\ee
where $S_b = \sigma T^4$ is the black-body heat flux from the radiating plane and $E_3(\tau)$ is the exponential integral function (order 3) of optical depth, $\tau$. The exact solutions and FDS results are shown in the table below.

\IfFileExists{SCRIPT_FIGURES/wall_internal_radiation.tex}{\input{SCRIPT_FIGURES/wall_internal_radiation.tex}}{\typeout{Error: Missing file SCRIPT_FIGURES/wall_internal_radiation.tex}}



\section{Radiation Emitted by Hot Spheres (\texorpdfstring{\textct{hot\_spheres}}{hot\_spheres}) }
\label{hot_spheres}

This case tests the calculation of the radiation heat flux from a collection of hot objects. Within two completely open volumes that are 1~m on a side, hot spheres with a diameter of 1~cm and temperature of 500~\si{\degree C} are situated within a smaller volume that is 0.5~m on a side. One of the open volumes contains 10 spheres, the other contains 50,000. The simulation lasts for 10~s. In the first volume, the heat loss is just the sum of the areas of the spheres multiplied by $\sigma T^4$ (emissivity is specified as unity in this case). See the upper left plot in Fig.~\ref{hot_spheres_plot}. In the second volume, the region is densely packed and it is expected that the collection of spheres will radiate like a solid cube  that is 0.5~m on a side and whose temperature is 500~\si{\degree C}. This is just under 30~kW, as shown in the upper right of Fig.~\ref{hot_spheres_plot}. The plot in the lower left of Fig.~\ref{hot_spheres_plot} shows the incident heat flux to a gauge positioned at the center of the densely packed volume.  It is expected that this gauge would register a heat flux of $\sigma T^4=20.26$~kW/m$^2$. Finally, the plot in the lower right of Fig.~\ref{hot_spheres_plot} indicates the integrated intensity, $4 \sigma T^4=81.04$~kW/m$^2$.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/hot_spheres_rad_loss_1} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/hot_spheres_rad_loss_2} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/hot_spheres_heat_flux}  &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/hot_spheres_intensity}
\end{tabular*}
\caption[Radiation from hot spheres]{The total heat losses, radiative heat flux, and integrated intensity of a collection of loosely and densely packed radiating spheres.}
\label{hot_spheres_plot}
\end{figure}


\section{Radiation Absorbed by Liquid Droplets (\texorpdfstring{\textct{droplet\_absorption}}{droplet\_absorption}) }
\label{droplet_absorption}
\label{droplet_absorption_cart}
\label{droplet_absorption_cyl}

These cases check that energy is conserved when radiation is absorbed by liquid droplets. We want to make sure that the absorbed thermal radiation is accurately converted into internal energy of the droplets. The rate of increase of the average droplet temperature, $\overline{T}_{\rm p}$, is related to the rate of radiation absorption of all the droplets, $\dot{Q}_{\rm r}$, according to the following equation:
\be
m \, c_p \frac{\d \overline{T}_{\rm p}}{\d t} = \dot{Q}_{\rm r}
\ee
where $m$ and $c_p$ are the total mass and specific heat of the droplets, respectively. The convective heat transfer between the gas and the droplets is small because the gas phase Prandtl number has been set to an artificially high value. If the radiative intensity remains constant during the time step, the average droplet temperature over a time period, $\Delta t$, should be:
\be
\overline{T}_{\rm p} = T_0 + \frac{\Delta t \, \dot{Q}_{\rm r} }{m \, c_p}
\ee
By setting $T_0=0$~\si{\degree C}, $\Delta t =0.01$~s, $m =0.01$~kg, and $c_p =1.0$~kJ/(kg$\cdot$K), the final value of $\overline{T}_{\rm p}$ should equal $\dot{Q}_{\rm r}$. Figure~\ref{droplet_absorption_figures} shows comparisons of the predicted average droplet temperature and the expected value in Cartesian and cylindrical coordinate systems.

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/droplet_absorption_cart} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/droplet_absorption_cyl}
\end{tabular*}
\caption[Radiation absorption by liquid droplets]{Transfer of absorbed thermal radiation energy into increased average droplet temperature.}
\label{droplet_absorption_figures}
\end{figure}



\section{Radiation Absorbed by Solid Particles (\texorpdfstring{\textct{particle\_absorption}}{particle\_absorption}) }
\label{particle_absorption}
\label{particle_absorption_cart_surf_cart}
\label{particle_absorption_cart_surf_cyl}
\label{particle_absorption_cart_surf_sph}

Tests similar to those in Section~\ref{droplet_absorption} are performed for solid particles with Cartesian (flat plate), cylindrical and spherical geometries. All the relevant properties are the same, along with a high thermal conductivity, 100~W/(m$\cdot$K), because solid particles are not assumed to be thermally-thin like liquid droplets. Figure~\ref{particle_absorption_figures} shows comparisons of the predicted and expected mass-averaged particle temperatures. By default, the radiation is expressed in terms of an integrated average over the entire particle surface, but there is an option to ``split'' the particles into multiple parts that absorb radiation impinging from different directions. In this case, the cylindrical and spherical particles are split in half along the $x$, $y$ and $z$ axes. The plate particles are split into two halves facing upwards and downwards, or into 5 randomly selected fragments to test for asymmetry bugs.

\begin{figure}[h]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_absorption_cart_surf_cart} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_absorption_cart_surf_cyl}\\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_absorption_cart_surf_sph}
\end{tabular*}
\caption[Radiation absorbed by solid particles]{Temperature increase of solid particles due to absorbed radiation.}
\label{particle_absorption_figures}
\end{figure}



\section{Radiation Attenuation by Scattering Particles (\texorpdfstring{\textct{part\_attenuation}}{part\_attenuation}) }
\label{part_attenuation}

This case is a qualitative assessment of the attenuation of thermal radiation by four different types of particles. In each case, the radiation is computed inside a one meter cube with one hot and five cold walls. The radiative heat flux is monitored on the wall that is opposite the hot wall. In each case, 10~g of non-evaporating, monodisperse, 100~$\mu$m particles with a density of 1,000~\si{kg/m^3} are placed inside the cube. Five different cases are computed. The reference case contains no particles. The four other cases contain transparent particles, water droplets, fuel droplets, and opaque particles. Different methods to specify the refractive index are tested. For water and fuel droplets, the FDS internal tables are used. For transparent particles, the refractive index is $\hbox{m} = 1.0+0\,i$. For opaque particles, the refractive index is $\hbox{m} = 1.5+0.5 \,i$. The resulting heat fluxes are plotted in Fig.~\ref{part_attenuation_figure}. The transparent particles do not attenuate the radiation, and the relatively opaque particles give the highest attenuation. The heat fluxes through water and fuel droplets fall between the two extremes.

This case also demonstrates the finite convergence rate of the radiation calculations with scattering media. As can be seen, the radiation field is not converged to its final value instantaneously because there are no internal iterations in the radiation solver. As a result, a slight increase of the heat flux is observed after 0.5 s, which is the third time step, i.e. the second call of the radiation solver. Further, smaller increase can be seen three steps later. In real applications with small time steps, the time lag of the radiation field is small.

\begin{figure}[h]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/part_attenuation}
\caption[Radiation attenuation by Lagrangian particles]{Attenuation of thermal radiation by four different classes of Lagrangian particles.}
\label{part_attenuation_figure}
\end{figure}


\section{Radiation Attenuation by Non-Scattering Particles \\ (\texorpdfstring{\textct{radiation\_gas-veg\_consistency}}{radiation\_gas-veg\_consistency})}
\label{radiation_gas-veg_consistency}
\label{radiation_gas-veg_consistency_gas}
\label{radiation_gas-veg_consistency_veg}

Relatively large solid particles, like idealized vegetation, act as opaque, non-scattering absorbers of thermal radiation. For a cloud of particles contained within a region $\Omega$ with volume $V$, the absorption coefficient is taken to be
\be
   \kappa_{\rm p} = \sum_{m \in \Omega} \frac{A_{{\rm s},m}}{4 \, V}
\ee
where $A_{{\rm s},m}$ is the surface area of particle $m$. For this test case, the space between two infinitely wide parallel plates, 1~m apart, is filled with either a gas with constant absorption coefficient, $\kappa=5.04$~m$^{-1}$, or a uniform distribution of mondisperse solid spheres of radius 0.7614~mm and density 514~kg/m$^3$ such that the total mass of spheres per unit volume is $m'''=2.63$~kg/m$^3$. In the simulation, only one particle per grid cell is used to represent all the particles in that cell. The effective absorption coefficient can be calculated:
\be
   N_{\rm p} = \frac{ m''' \, V }{m_{\rm p}} \quad ; \quad \kappa_{\rm p} = N_{\rm p} \frac{A_{{\rm s},m}}{4 \, V} = 5.04 \; \hbox{m}^{-1}
\ee
Here, $N_{\rm p}$ is the actual number of spheres represented by the single particle within a grid cell that is 10~cm on each side.

Figure~\ref{fig_radiation_gas-veg_consistency} displays the radiative heat flux at various distances from the hot plate, demonstrating that the cloud of particles act the same way as a gas with constant absorption coefficient.

\begin{figure}[!ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiation_gas-veg_consistency_gas} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiation_gas-veg_consistency_veg}
\end{tabular*}
\caption[The {\ct radiation\_gas-veg\_consistency} test cases]{Heat flux at various distances from an infinitely wide hot plate where the radiation is attenuated by either a gas with constant absorption coefficient (left) or a cloud of mondisperse, non-scattering spheres (right).}
\label{fig_radiation_gas-veg_consistency}
\end{figure}



\section{Transient Thermocouple Response (\texorpdfstring{\textct{TC\_heating}}{TC\_heating}) }
\label{TC_heating}

A thermocouple is placed in the center of a 1~m cube with walls set to 600~\si{\degree C} and gas temperature set to 20~\si{\degree C}.  The heat transfer coefficient is set to zero to eliminate convective heating. The gas temperature remains at 20~$^{\circ}$C because there is no convective heat transfer from the walls.  The thermocouple heats up according to the equation:
\be
\label{eq: rad}
  \rho_{\hbox{\tiny TC}} \, c_{\hbox{\tiny TC}} \, V_{\hbox{\tiny TC}} \frac{\d T_{\hbox{\tiny TC}}}{\d t}=\epsilon_{\hbox{\tiny TC}} \, \sigma \, A_{\hbox{\tiny TC}}
  \left(T_{\rm s}^{4}-T_{\hbox{\tiny TC}}^4 \right)
\ee
whose analytical solution is:
\be
\label{eq: rad_sol}
t=\left.\frac{\ln(x+1) - \ln(1-x) + 2 \tan^{-1}(x)}{4 \, \beta \, T_{\rm s}^3}\right|_{T_{\hbox{\tiny TC}}(0)}^{T_{\hbox{\tiny TC}}(t)}
\quad ; \quad \beta=\frac{\epsilon_{\hbox{\tiny TC}} \, \sigma A_{\hbox{\tiny TC}}}{\rho_{\hbox{\tiny TC}} \, c_{\hbox{\tiny TC}} \, V_{\hbox{\tiny TC}}} \quad ; \quad
  x=\frac{T_{\hbox{\tiny TC}}}{T_{\rm s}}
\ee
Figure~\ref{TC_heating_plot} displays the thermocouple response compared to the analytical solution.
\begin{figure}[h]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/TC_heating}
\caption[Transient thermocouple heating]{Increasing temperature of a thermocouple surrounded by walls at 600~\si{\degree C}.}
\label{TC_heating_plot}
\end{figure}



\section{Radiation and Thermocouples (\texorpdfstring{\textct{TC\_view\_factor}}{TC\_view\_factor}) }
\label{TC_view_factor}

This case tests the radiation solver using the simple thermocouple model in FDS.  Suppose that a small, thermally thin metal bead is at the center of a 1~m cube. The left half of the cube boundary surface is at 20~\si{\degree C}, the right half at 500~\si{\degree C}. Assume that there is no convective heat transfer to the bead; only radiation. Assume everything has an emissivity of 1. The bead temperature ought to rise to a steady value of
\be
   T_{\hbox{\tiny TC}} = \left( \frac{T_1^4 + T_2^4}{2} \right)^\frac{1}{4} -273.15 = \left( \frac{293.15^4 + 773.15^4}{2} \right)^\frac{1}{4} -273.15 = 380.3 \quad ^\circ \hbox{C}
   \label{ideal_TC}
\ee
The thermocouple model in FDS uses the integrated intensity divided by 4, $U/4$, as the average heat flux to the bead surface. In the absence of convection, the steady value of the bead temperature ought to be
\be
   T_{\hbox{\tiny TC}} = \left( \frac{U}{4 \, \sigma} \right)^\frac{1}{4} - 273.15
\ee
This is essentially what is plotted in Fig.~\ref{TC_view_factor_plot}, compared to the ideal value as computed in Eq.~(\ref{ideal_TC}).
\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/TC_view_factor}
\caption[Radiation/thermocouple test case]{Temperature of a thermocouple equidistant from walls at temperatures of 20~\si{\degree C} and 500~\si{\degree C}.}
\label{TC_view_factor_plot}
\end{figure}



\section{Radiation Targets (\texorpdfstring{\textct{target\_test}}{target\_test}) }
\label{target_test}

This case tests the functionality of particle ``targets;'' that is, massless Lagrangian particles that serve to record the heat flux at a given point with a given orientation. Essentially, the particle is an infinitesimally small heat flux gauge. Two unit cubes are set up, each with a top surface set to 1000~$^\circ$C. In one cube, a small solid obstruction is created with a device embedded in its top facing upwards. In the other cube, a plate-shaped particle is placed at the same location and given an upward facing orientation. The radiative heat flux to both the obstruction and the particle should be the same, as shown in Fig.~\ref{target_test_plot}.
\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/target_test}
\caption[The \textct{target\_test} case]{Heat flux from a hot plate to two different types of targets.}
\label{target_test_plot}
\end{figure}



\section{Radiation Shield (\texorpdfstring{\textct{radiation\_shield}}{radiation\_shield}) }
\label{radiation_shield}

A lead radiation shield with a thickness of 0.1~mm is placed between two infinitely wide parallel plates at 500~\si{\degree C} and 20~\si{\degree C}.  The computational domain has dimensions of 10~m by 0.1~m by 1~m. The sides of the domain are assumed to be symmetry planes.  The emissivity, $\varepsilon_{3}$, of the lead shield is 0.48 on both sides.  At 400~s, the shield is removed.  Assuming that there is no convective heat transfer and that the emissivity of the hot and cold plates is 1, the steady-state heat flux to the cold plate should be~\cite{Incropera:1}:
\be
   \dq_{12}'' = \frac{\sigma(T_{1}^{4}-T_{2}^{4})}{\frac{1}{\varepsilon_1}+\frac{1}{\varepsilon_2}+2 \left(\frac{1-\varepsilon_3}{\varepsilon_3} \right)} = 4.76 \; \hbox{kW/m}^2
\ee
where $T_{1}$ and $T_{2}$ are the hot and cold plate temperatures, respectively, and $\varepsilon_1$, $\varepsilon_2$, and $\varepsilon_3$ are the emissivity values for the hot plate, cold plate, and lead shield, respectively. When the shield is removed at 400~s, the heat flux should increase to 19.8~kW/m$^2$.  The predicted heat flux is given in Fig.~\ref{radiation_shield_plot}.
\begin{figure}[ht]
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiation_shield_flux}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiation_shield_temp}
\caption[The \textct{radiation\_shield} test case]{(Left) Heat flux to a cold plate separated from a hot plate by a heat shield. At 400~s, the shield is removed. (Right) Temperature of the heat shield.}
\label{radiation_shield_plot}
\end{figure}
Because the heat flux from the hot plate to the shield is equal to the heat flux from the hot plate to the cold plate, the shield temperature can be calculated using~\cite{Incropera:1}:
\be
   \dq_{12}'' = \dq_{13}'' = \frac{\sigma(T_{1}^{4}-T_{3}^{4})}{\frac{1}{\varepsilon_1}+\frac{1}{\varepsilon_3}-1} \quad ; \quad T_3=380.4 \; ^\circ\hbox{C}
\ee
The predicted shield temperature is plotted in Fig.~\ref{radiation_shield_plot}.


\section{Radiation from a gas-fired panel (\texorpdfstring{\textct{radiation\_gas\_panel}}{radiation\_gas\_panel}) }
\label{radiation_gas_panel}

A gas-fired panel is often used as a source of thermal radiation in laboratory experiments.  Here, the heat flux from an $h=30.48$~cm square panel is computed at distances of 10~cm, 15~cm, 25~cm, 38~cm, 46~cm, 61~cm, and 76~cm along its perpendicular center axis, and along a perpendicular line that is displaced laterally 14~cm and vertically 14~cm from the center axis, as illustrated in Fig.~\ref{radiation_gas_panel_plot}.  We compare the results computed by FDS to those calculated using configuration factors. The temperature and emissivity of the panel are set to 1250~K and 0.7, respectively, and the ambient temperature is 273~K.

The configuration factor, $\d F_{2 \rightarrow 1}$, describing the energy exchange between the radiant panel and a target with differential area $\d A_1$ located on a perpendicular line extending from the panel at the point  $(\overline{x}, \overline{y})$ is computed from the following:
\begin{align}
 \d F_{2 \rightarrow 1} (R; \overline{x}, \overline{y})
    &= \frac{\d A_1}{\pi \, A_2}
        \int_{-h/2}^{h/2} \int_{-h/2}^{h/2} \frac{R^2}{\left[ (x-\overline{x})^2 + (y-\overline{y})^2 + R^2 \right]^2} \d x \, \d y
 \label{eq:2->d1 configuration factor - general}
\end{align}
The comparison of FDS and the exact solution is shown in Fig.~\ref{radiation_gas_panel_plot}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{FIGURES/radiation_gas_panel_configuration}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/radiation_gas_panel}
\caption[The \textct{radiation\_gas\_panel} case]{\emph{Left}: A radiant panel and target dA$_1$ located a distance $R$ from the panel on its center axis.  \emph{Right}: Comparison of FDS and the exact result.}
\label{radiation_gas_panel_plot}
\end{figure}



\chapter{Species and Combustion}

This chapter contains examples that test the computations related to species concentrations, gas properties and combustion.



\section{Product Yields (\texorpdfstring{\textct{methane\_flame}}{methane\_flame})}
\label{methane_flame}

A simple methane flame with 10~\% CO yield is burned inside a closed cavity for 5~s.
The total mass of CO$_2$, H$_2$O and CO is recorded.
The simulation is performed using the three alternative ways
to define the combustion reaction: {\em simple chemistry}, {\em primitive species}, and {\em lumped species}. The
same amount of each product species should be produced in each case. The following figure compares the
mass of the three combustion products. The figure compares the simple chemistry versus the primitive species versus the lumped species.
\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/methane_flame_reac_comp}
\caption[Yield of combustion products for alternative reactions]{The combustion product masses using three alternative definitions of the reaction:  Simple chemistry vs. primitive species vs. lumped species. }
\label{fig_methane_flame_yields}
\end{figure}


\section{Reaction Rates (\texorpdfstring{\textct{reactionrate}}{reactionrate})}

This section describes a series of test cases designed to check the reaction rate mechanism using the eddy dissipation concept model for infinitely fast reactions (EDC) and  finite-rate (Arrhenius) reactions. In the most basic sense, if a reaction occurs the rate of the reaction is either infinite or finite-rate. For an infinite-rate reaction, the rate is limited by the minimum reactant concentration. For $i$ finite-rate reactions, the rate of species $\alpha$ is dependent on factors such as local species concentration ($Y_{\alpha}$), temperature ($T$), and Arrhenius parameters ($E,A,a$):
\begin{equation}\label{eq:finite_rate1}
\frac{\d Y_{\alpha}}{\d t} = -\frac{1}{\rho}\sum_{i} \left(\frac{\nu_{\alpha,i}\,W_{\alpha}}{\nu_{F,i}\,W_{F}}\right)A_i^{\prime}\;T^{n_i}\;e^{-E_i/RT}\;\prod Y_{\alpha}\,^{a_{\alpha,i}} \;\;\; \text{where} \;\;\; A^{\prime}_{i} = A_{i}\;\rho^{\sum a_{\alpha}}\prod W_{\alpha}\,^{-a_{\alpha,i}}
\end{equation}

Detailed discussion on the combustion routines can be found in the FDS Technical Reference Guide~\cite{FDS_Tech_Guide}.

\subsection{Mixing-Controlled Reactions (\texorpdfstring{\textct{reactionrate\_EDC}}{reactionrate\_EDC})}
\label{mixing_reactions}
\label{reactionrate_EDC_flim_1step_CH4}
\label{reactionrate_EDC_flim_1step_C3H8}
\label{reactionrate_EDC_1step_CH4_nonmix}
\label{reactionrate_EDC_O2lim_1step}
\label{reactionrate_EDC_O2lim_2fuel}
\label{reactionrate_series_reaction}
\label{reactionrate_EDC_flim_2step}
\label{reactionrate_lumped_two_air}

The cases presented in the section are designed to examine species evolutions for reactions of varying complexity using the EDC model with infinitely fast chemistry. The first test case is a one-step methane reaction that occurs in a constant volume, adiabatic ``reactor'' with a fixed mixing time of $\tau_{\rm mix}=0.125$~s. Each computational cell contains a stoichiometric mixture of fuel and air. In this problem ``air'' is defined to be 21 \% oxygen and 79 \% nitrogen by volume.
\begin{equation}\label{eq:1step_methane}
\mathrm{CH_4 + 2\, O_2 \rightarrow  CO_2 + 2\, H_2O}
\end{equation}

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_flim_1step_CH4_spec}
\caption[Species evolution in a 1-step methane EDC reaction]{Time evolution of species mass fraction for a one-step methane EDC reaction with a fixed mixing time of $\tau_{\rm mix}=0.125$~s.}
\label{fig:EDC_1Step_meth_spec}
\end{figure}

In addition to species, we want to compare FDS predictions for temperature and pressure. For this reacting system, the internal energy remains constant, thus the temperature can be found from:
\begin{equation}\label{eq:del_u}
\overline{u}_{{\rm P},\alpha} - \overline{u}_{{\rm R},\alpha} = 0
\end{equation}
where ${\rm P}$ represents the products, ${\rm R}$ represents the reactants, and $\overline{u}_{\alpha}=\overline{h}_{\alpha}-\R T$. The total enthalpy, $\overline{h}_{\alpha}$, is defined as the sum of the enthalpy of formation ($\overline{h}_{f}^{\circ}$) and sensible enthalpy ($\Delta \overline{h}$) for each of the $\alpha$ species. Assuming the products behave like an ideal gas, the final pressure can be found using the equation of state for an ideal gas:
\begin{equation}\label{eq:ideal_gas}
PV = n \R T
\end{equation}
\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_flim_1step_CH4_temp} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_flim_1step_CH4_pres}
\end{tabular*}
\caption[Temperature and pressure evolution in a 1-step methane EDC reaction]{Time evolution of temperature and pressure for a one-step methane EDC reaction with a fixed mixing time of $\tau_{\rm mix}=0.125$~s.}
\label{fig:EDC_1Step_meth_temppres}
\end{figure}

Under the same conditions as the methane case, species, temperature, and pressure are compared to expected results for a one-step propane reaction:
\begin{equation}\label{eq:1step_propane}
\mathrm{C_3H_8 + 5\, O_2 \rightarrow  3\, CO_2 + 4\, H_2O}
\end{equation}
The results for the propane case are shown in Figs.~\ref{fig:EDC_1Step_prop_spec} (species) and \ref{fig:EDC_1Step_prop_temppres} (temperature and pressure).

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_flim_1step_C3H8_spec}
\caption[Species evolution in a 1-step propane EDC reaction]{Time evolution of species mass fraction for a one-step propane EDC reaction with a fixed mixing time of $\tau_{\rm mix}=0.125$~s.}
\label{fig:EDC_1Step_prop_spec}
\end{figure}

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_flim_1step_C3H8_temp} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_flim_1step_C3H8_pres}
\end{tabular*}
\caption[Temperature and pressure evolution in a 1-step propane EDC reaction]{Time evolution of temperature and pressure for a one-step propane EDC reaction with a fixed mixing time of $\tau_{mix}=0.125$~s.}
\label{fig:EDC_1Step_prop_temppres}
\end{figure}

In the previous two examples, each computational cell contained a stoichiometric mixture of fuel and air. For this third example, the cells are initialized to be all fuel in one part of the reactor and all air in the remaining volume. Globally, the reactor is fuel rich and follows the same one-step methane reaction as described by \ref{eq:1step_methane}. Figures \ref{fig:EDC_meth_non_spec} and \ref{fig:EDC_meth_non_temppres} show the species concentrations, temperature, and pressure from FDS and the expected values. In this case, the final state is not reached until approximately 35 s compared to 1 s for the cases where each cell contained a flammable composition.

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_1step_nonmix_spec}
\caption[Species evolution in 1-Step methane EDC reaction]{Time evolution of species mass fraction for a one-step methane EDC reaction with a fixed mixing time of $\tau_{\rm mix}=0.125$~s. }
\label{fig:EDC_meth_non_spec}
\end{figure}

\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_1step_nonmix_temp} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_1step_nonmix_pres}
\end{tabular*}
\caption[Temperature and pressure evolution in a 1-step Methane EDC reaction]{Temperature (left) and pressure (right) evolution for a one-step methane EDC reaction with a fixed mixing time of $\tau_{\rm mix}=0.125$~s.}
\label{fig:EDC_meth_non_temppres}
\end{figure}

The EDC reaction implementation is also tested to check species evolution for chemical reactions of increased complexity. The first is a consecutive two-step, fuel-limited methane reaction:
\begin{align}\label{eq:2step_methane}
\mathrm{CH_4 + 1.5 \, O_2} &\rightarrow  \mathrm{CO + 2 \, H_2O} \\
\nonumber \mathrm{CO + 0.5 \, O_2} &\rightarrow \mathrm{CO_2}
\end{align}
Each cell in the model reaction is initialized with an oxygen rich mixture and the mixing time, $\tau_{\rm mix}$, is fixed at $0.05$~s (Fig.~\ref{fig:EDC_2Step_fuel}).

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_flim_2step}
\caption[Species evolution in 2-step methane EDC reaction]{Time evolution of species mass fraction for a series, fuel-limited EDC reaction with a fixed mixing time of $\tau_{\rm mix}=0.05$~s.}
\label{fig:EDC_2Step_fuel}
\end{figure}

The second reaction test case is a consecutive three-step, fuel limited propane reaction:
\begin{align}\label{eq:3step_propane}
\mathrm{C_3H_8 + 1.5 \, O_2} &\rightarrow  \mathrm{3 \,CO + 4 \, H_2} \\
\nonumber \mathrm{CO + 0.5 \, O_2} &\rightarrow \mathrm{CO_2} \\
\nonumber \mathrm{H_2 + 0.5 \, O_2} &\rightarrow \mathrm{H_2O}
\end{align}
The species evolutions are compared to expected values in Fig.~\ref{fig:reactionrate_series_reaction}.

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_series_reaction}
\caption[Results of the {\ct reactionrate\_series\_reaction} case]{Results of the {\ct reactionrate\_series\_reaction} case.}
\label{fig:reactionrate_series_reaction}
\end{figure}

The third test case has two competing, oxygen-limited reactions; a one-step methane and one-step propane reaction.
\begin{align}\label{eq:2step_o2_lim}
\mathrm{CH_4 + 2 \, O_2} &\rightarrow  \mathrm{CO_2 + 2 \, H_2O} \\
\nonumber \mathrm{C_3H_8 + 5 \, O_2} &\rightarrow \mathrm{3 \,CO_2 + 4 \, H_2O}
\end{align}
The species evolutions are compared to expected values in Fig.~\ref{fig:EDC_2Step_ox}.

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_EDC_O2lim_2fuel}
\caption[Species evolution in two parallel EDC reactions]{Time evolution of species mass fraction for oxygen-limited EDC two fuel reaction set with a fixed mixing time of $\tau_{\rm mix}=0.1$~s.}
\label{fig:EDC_2Step_ox}
\end{figure}

The fourth test case has propane (fuel), competing with two identical but separately lumped air species. Each cell is initialized with stoichiometric amount of fuel and air; each air is initialized in equal quantities.
\begin{align}\label{eq:lumped_2_air}
\mathrm{C_3H_8 + 5 \, AIR1} &\rightarrow  \mathrm{PRODUCTS} \\
\nonumber \mathrm{C_3H_8 + 5 \, AIR2} &\rightarrow \mathrm{PRODUCTS}
\end{align}
The lumped species used in these reactions are defined by:
\begin{lstlisting}
&SPEC ID = 'PROPANE' /
&SPEC ID = 'OXYGEN',            LUMPED_COMPONENT_ONLY = .TRUE. /
&SPEC ID = 'NITROGEN',          LUMPED_COMPONENT_ONLY = .TRUE. /
&SPEC ID = 'WATER VAPOR',       LUMPED_COMPONENT_ONLY = .TRUE. /
&SPEC ID = 'CARBON DIOXIDE',    LUMPED_COMPONENT_ONLY = .TRUE. /

&SPEC ID = 'AIR1', SPEC_ID = 'OXYGEN','NITROGEN', VOLUME_FRACTION =1,3.76, BACKGROUND=.TRUE. /
&SPEC ID = 'AIR2', SPEC_ID = 'OXYGEN','NITROGEN', VOLUME_FRACTION =1,3.76 /
&SPEC ID = 'PRODUCTS', SPEC_ID = 'CARBON DIOXIDE', 'WATER VAPOR', 'NITROGEN',VOLUME_FRACTION = 3,4,18.8 /
\end{lstlisting}
The species evolutions are compared to expected values in Fig.~\ref{fig:reactionrate_lumped_two_air}.
\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_lumped_two_air}
\caption[Results of the {\ct reactionrate\_lumped\_two\_species} case]{Results of the {\ct reactionrate\_lumped\_two\_species} case.}
\label{fig:reactionrate_lumped_two_air}
\end{figure}



\FloatBarrier

\subsection{Finite Rate Reactions (\texorpdfstring{\textct{reactionrate\_arrhenius}}{reactionrate\_arrhenius})}
\label{finite_rate_reactions}
\label{reactionrate_arrhenius_equilibrium}
\label{reactionrate_arrhenius_0order_1step}
\label{reactionrate_arrhenius_2order_1step}
\label{reactionrate_arrhenius_1p75order_2step}
\label{reactionrate_arrhenius_1p75order_2stepr}


The main difference between Arrhenius rate reactions and the mixing-controlled reactions is that the reaction rate in finite rate reactions is found from local parameters such as species concentration and temperature as well as rate constants. The values of $a_{\alpha}$ in Eq.~(\ref{eq:finite_rate1}) are specific to each reaction and for non-zero values, $\d Y_{\alpha}/ \d t$ becomes  a non-linear differential equation. We consider both linear and non-linear cases with one and two-step reaction mechanisms. First we examine two one-step cases; a zero-order and second-order reaction. Equation (\ref{eq:1step_CO}) shows a one-step, zero-order test case of carbon monoxide oxidation:
\begin{equation}\label{eq:1step_CO}
\mathrm{CO+0.5 \, O_2 \rightarrow  CO_2}
\end{equation}
The reaction rate input parameters are shown in the table below. $E$, $a_{\alpha}$, and $n_{\alpha}$ are set to zero, and $A$ is set such that ${k}_{i} = 1$. The resulting reaction rates simplify to a function of molecular weight and stoichiometric coefficients. Species evolutions results from the CO reaction in Eq.~(\ref{eq:1step_CO}) are shown in Fig.~\ref{fig:Arrhenius_0Order_1step}.
\begin{table}[ht]
\begin{center}
\caption[Arrhenius values for a single step CO reaction]{Arrhenius values for a single step CO reaction; $\alpha$ = [$\mathrm{CO}$ $\mathrm{O_2}$ $\mathrm{CO_2}$].}
\label{single_step_co}
\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\hline Reaction & $\nu_{\alpha}$ & E (J/mol) & A (cm$^3$/mole/s) & $a_{\alpha}$ & $n_{\alpha}$  \\ \hline \hline
\ref{eq:1step_CO} & [-1 -0.5 1] & 0 & 4.244e-6 & [0 0 0] & [0 0 0] \\ \hline
\end{tabular}
\end{center}
\end{table}
\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_arrhenius_0order_1step}
\caption[Species evolution in a 0-order 1-step finite rate reaction]{Time evolution of species mass fraction for a one-step zero-order Arrhenius finite rate reaction.}
\label{fig:Arrhenius_0Order_1step}
\end{figure}
The second finite rate test case is a one-step, second-order propane reaction, Eq.~(\ref{eq:1step_propane}). The table below shows the reaction rate input parameters. In this case, $a_{\alpha}=[1,1,0,0]$  for propane, oxygen, carbon monoxide, and water vapor respectively. This makes the reaction second-order as $\mathcal{O}=\sum a_{\alpha}$. Species evolutions for the one-step second-order reaction are shown in Fig.~\ref{fig:Arrhenius_2Order_1step}.
\begin{table}[ht]
\begin{center}
\caption[Arrhenius values for a single step C$_3$H$_8$ reaction]{Arrhenius values for a single step C$_3$H$_8$ reaction; $\alpha$ = [$\mathrm{C_3H_8}$ $\mathrm{O_2}$ $\mathrm{CO_2}$ $\mathrm{H_2O}$].}
\label{single_step_c3h8}
\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\hline Reaction & $\nu_{\alpha}$ & E (J/mol) & A (cm$^3$/mole/s) & $a_{\alpha}$ & $n_{\alpha}$  \\ \hline \hline
\ref{eq:1step_propane} & [-1 -5 3 4] & 0 & 4e5 & [1 1 0 0] & [0 0 0 0] \\ \hline
\end{tabular}
\end{center}
\end{table}
\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_arrhenius_2order_1step}
\caption[Species evolution in a 2-order 1-step finite rate reaction]{Time evolution of species mass fraction for a one-step second-order Arrhenius finite rate reaction.}
\label{fig:Arrhenius_2Order_1step}
\end{figure}
Multi-step Arrhenius finite rate reactions are also examined. First, we consider a two-step forward propane reaction:
\begin{subequations}
\begin{align}
\label{eq:2step_propane_a}
\mathrm{C_3H_8+3.5 \, O_2} &\rightarrow  \mathrm{3 \, CO + 4 \, H_2O} \\
\label{eq:2step_propane_b}
\mathrm{CO+0.5 \, O_2} &\rightarrow \mathrm{CO_2}
\end{align}
\end{subequations}
with the following reaction input parameters:

\begin{table}[ht]
\begin{center}
\caption[Arrhenius values for a two-step C$_3$H$_8$ reaction]{Arrhenius values for a two-step C$_3$H$_8$ reaction; $\alpha$ = [$\mathrm{C_3H_8}$ $\mathrm{O_2}$ $\mathrm{CO}$ $\mathrm{H_2O}$ $\mathrm{CO_2}$].}
\label{two_step_c3h8}
\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\hline Reaction & $\nu_{\alpha}$ & E (J/mol) & A (cm$^3$/mole/s) & $a_{\alpha}$ & $n_{\alpha}$  \\ \hline \hline
\ref{eq:2step_propane_a} & [-1 -3.5 3 4 0] & 0 & 5e2 & [0.1 1.65 0 0 0] & [0 0 0 0 0] \\ \hline
\ref{eq:2step_propane_b} & [0 -0.5 -1 0 1] & 0 & 8e3 & [0 0.25 1 0.5 0] & [0 0 0 0 0] \\ \hline
\end{tabular}
\end{center}
\end{table}

The species evolutions for the two-step 1.75 order reaction mechanism are shown in Fig.~\ref{fig:Arrhenius_175Order_2step}. We also consider a two-step reversible propane reaction:
\begin{subequations}
\begin{align}
\label{eq:2step_propane_rev_a}
\mathrm{C_3H_8+3.5 \, O_2} &\rightarrow \mathrm{3 \, CO+4 \, H_2O} \\
\label{eq:2step_propane_rev_b}
\mathrm{CO + 0.5 \, O_2} &\rightarrow \mathrm{CO_2} \\
\label{eq:2step_propane_rev_c}
\mathrm{CO_2} &\rightarrow \mathrm{CO + 0.5 \, O_2}
\end{align}
\end{subequations}
with the following reaction input parameters:
\begin{table}[ht]
\begin{center}
\caption[Arrhenius values for a two-step reversible C$_3$H$_8$ reaction]{Arrhenius values for a two-step reversible C$_3$H$_8$ reaction; $\alpha$ = [$\mathrm{C_3H_8}$ $\mathrm{O_2}$ $\mathrm{CO}$ $\mathrm{H_2O}$ $\mathrm{CO_2}$].}
\label{two_step_rev_c3h8}
\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\hline Reaction & $\nu_{\alpha}$ & E (J/mol) & A (cm$^3$/mole/s) & $a_{\alpha}$ & $n_{\alpha}$  \\ \hline \hline
\ref{eq:2step_propane_rev_a} & [-1 -3.5 3 4 0] & 0 & 5e2  & [0.1 1.65 0 0 0] & [0 0 0 0 0] \\ \hline
\ref{eq:2step_propane_rev_b} & [0 -0.5 -1 0 1] & 0 & 8e3  & [0 0.25 1 0.5 0] & [0 0 0 0 0] \\ \hline
\ref{eq:2step_propane_rev_c} & [0 0.5 1 0 -1]  & 0 & 4e-4 & [0 0 0 0 0 1]    & [0 0 0 0 0] \\ \hline
\end{tabular}
\end{center}
\end{table}
Equations (\ref{eq:2step_propane_rev_a})-(\ref{eq:2step_propane_rev_c}) includes the decomposition of $\mathrm{CO_2}$ into $\mathrm{CO}$ and $\mathrm{O_2}$ whereas the forward-only two-step mechanism, Eqs.~(\ref{eq:2step_propane_a})-(\ref{eq:2step_propane_b}), does not. This reverse reaction mechanism is represented by three separate reactions on the \textct{REAC} line in an FDS input file as indicated by rows $\mathrm{a}$, $\mathrm{b}$ and $\mathrm{c}$ in the preceding table. Species evolutions for the 2 step reverse reaction are shown in Fig.~\ref{fig:Arrhenius_175Order_2stepR}. In the forward CO step, (row $\mathrm{b}$ in the two prior tables), we see that water vapor contributes to the reaction rate based on its local concentration despite not being a participant in the reaction.
\vskip8pt
Note: the values of $E$ and $A$ used in these examples are not necessarily representative of the chemical reactions presented. When using finite rate chemistry consult experimental data or literature for appropriate reaction parameters.

\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_arrhenius_1p75order_2step}
\caption[Species evolution in a 1.75-order 2-step finite rate reaction]{Time evolution of species mass fraction for a two-step Arrhenius finite rate propane reactions.}
\label{fig:Arrhenius_175Order_2step}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_arrhenius_1p75order_2stepr}
\caption[Species evolution in a 1.75-order 2-step reversible finite rate reaction]{Time evolution of species mass fraction for a two-step reversible Arrhenius finite rate propane reactions.}
\label{fig:Arrhenius_175Order_2stepR}
\end{figure}

To couple verification of species mass fraction, compartment temperature, and compartment pressure, an equilibrium example problem was setup. In this case, we examine a sealed box filled with a stoichiometric mixture of fuel, oxygen, and nitrogen. The two-step reversible reaction mechanism, Eqs.~(\ref{eq:2step_propane_rev_a})-(\ref{eq:2step_propane_rev_c}), is used to drive the FDS simulation. The initial temperature is set to 350 \si{\degree C} to ensure the reaction occurs in a timely manner. The reaction rate parameters in the table below are based off values in literature from Westbrook and Dryer \cite{Westbrook:1}.
\begin{table}[ht]
\begin{center}
\caption[Arrhenius values for a two-step reversible C$_3$H$_8$ reaction]{Arrhenius values for a two-step reversible C$_3$H$_8$ reaction for equilibrium; $\alpha$ = [$\mathrm{C_3H_8}$ $\mathrm{O_2}$ $\mathrm{CO}$ $\mathrm{H_2O}$ $\mathrm{CO_2}$].}
\label{two_step_eq_rev_c3h8}
\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\hline Reaction & $\nu_{\alpha}$ & E (J/mol) & A (cm$^3$/mole/s) & $a_{\alpha}$ & $n_{\alpha}$  \\ \hline \hline
\ref{eq:2step_propane_rev_a} & [-1 -3.5 3 4 0] & 125520 & 1.5e12 & [0.1 1.65 0 0 0] & [0 0 0 0 0] \\ \hline
\ref{eq:2step_propane_rev_b} & [0 -0.5 -1 0 1] & 167360 & 3.4e13 & [0 0.25 1 0.5 0] & [0 0 0 0 0] \\ \hline
\ref{eq:2step_propane_rev_c} & [0 0.5 1 0 -1]  & 167360 & 8e8    & [0 0 0 0 0 1]    & [0 0 0 0 0] \\ \hline
\end{tabular}
\end{center}
\end{table}
Equilibrium values were determined using the NASA code Chemical Equilibrium with Applications (CEA)~\cite{Gordon:1994}. A constant volume, constant internal energy equilibrium calculation was performed where the equilibrium values were found by minimizing Helmholtz Energy. The equilibrium species were limited to $\mathrm{C_3H_8}$, $\mathrm{O_2}$, $\mathrm{CO}$, $\mathrm{H_2O}$, and $\mathrm{CO_2}$; the same species tracked in the FDS simulation.  The results are shown in Figs.~\ref{fig:Arrhenius_2Order_1stepb} and \ref{fig:Arrhenius_175Order_23stepb}.

\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_equilibrium_species}
\caption[Species evolution in an equilibrium case]{Time evolution of species mass fraction for a two-step Arrhenius finite rate reaction compared to equilibrium values.}
\label{fig:Arrhenius_2Order_1stepb}
\end{figure}

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_equilibrium_temperature} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_equilibrium_pressure}
\end{tabular*}
\caption[Temperature and pressure evolution for equilibrium case]{Time evolution of temperature (left) and pressure (right) for two-step Arrhenius finite rate propane reactions compared to equilibrium values.}
\label{fig:Arrhenius_175Order_23stepb}
\end{figure}


\FloatBarrier

\subsection{Fast-Slow Reaction Scheme (\texorpdfstring{\textct{reactionrate\_fast\_slow}}{reactionrate\_fast\_slow})}
\label{reactionrate_fast_slow}

A simple two-step reaction scheme for a clean-burning fuel like methanol can be written as follows:
\begin{subequations}
\begin{align}
\label{methanol_step1}
\mathrm{CH_3OH + O_2} &\rightarrow \mathrm{CO + 2 \, H_2O} \\
\label{methanol_step2}
\mathrm{CO + 0.5 \, O_2} &\rightarrow \mathrm{CO_2}
\end{align}
\end{subequations}
where the first reaction is infinitely fast and the second is not. Suppose the second reaction proceeds according to the evolution equation:
\be
   \frac{\d [{\rm CO}]}{\d t} = -1\times 10^{10} \, [{\rm CO}] \, [{\rm O_2}]
\ee
where $[{\rm CO}]$ is the concentration of CO in units of mol/cm$^3$. To test the scheme, a sealed, adiabatic cube 1~m on a side is filled with nitrogen, fuel gas, and oxygen with initial volume fractions of 0.89, 0.05, and 0.06. Because the rates are independent of temperature, the reaction proceeds immediately assuming that the gases are thoroughly mixed via the parameter {\ct INITIAL\_UNMIXED\_FRACTION=0}. Figure~\ref{fig:reactionrate_fast_slow} shows the fuel volume fraction very quickly dropping to zero, leaving some oxygen which then reacts relatively slowly with CO to form CO$_2$. The effective combined reaction is:
\be
\label{methanol_combined}
\mathrm{5 \, CH_3OH + 6 \, O_2} \rightarrow \mathrm{2 \, CO_2 + 3 \, CO + 10 \, H_2O}
\ee
The {\ct 'EXPLICIT EULER'} integration scheme is used with an initial gas phase time step of $1\times 10^{-6}$~s. The final volume fractions of CO$_2$ and CO are expected to be $2/104 \approx 0.0192$ and $3/104 \approx 0.0288$, respectively.

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/reactionrate_fast_slow}
\caption[Species evolution in a fast-slow reaction scheme]{Species evolution in a fast-slow reaction scheme.}
\label{fig:reactionrate_fast_slow}
\end{figure}

\FloatBarrier


\section{Heat Release Rates from Reaction Mechanisms (\textct{hrrpuv\_reac})}
\label{hrrpuv_reac}
\label{hrrpuv_reac_arrhenius}
\label{hrrpuv_reac_extinction}
\label{hrrpuv_reac_parallel}
\label{hrrpuv_reac_parallel_2}
\label{hrrpuv_reac_series}
\label{hrrpuv_reac_simple}
\label{hrrpuv_reac_single}
\label{hrrpuv_reac_soot}

One of the most important quantities computed in FDS is the heat release rate per unit volume (HRRPUV), $\dot{q}^{\ppp}$.  HRRPUV shows up in the energy equation and hence the expression for the velocity divergence (see the FDS Tech Guide \cite{FDS_Math_Guide}).  The value of $\dot{q}^{\ppp}$ within a computation cell can be computed two ways, which should be equivalent.  The first is to use individual species heats of formation times the respective chemical production rates:
\begin{equation}
\label{eq:qdotppp}
\dot{q}^{\ppp} = - \sum_\alpha \dot{m}_\alpha^{\ppp} \, \Delta h_{{\rm f},\alpha}^\circ
\end{equation}
Note that Eq.~(\ref{eq:qdotppp}) is what is ultimately used in the FDS divergence expression.

The second is to sum the individual reaction rates  times their respective heats of combustion, which are precomputed in the read routines in FDS:
\begin{equation}
\label{eq:qdotppp2}
\dot{q}^{\ppp} = \sum_i r_{{\rm F},i}^\prime \, \Delta H_{{\rm c},i}
\end{equation}
Here F denotes the fuel for reaction $i$.

In this section, we show results comparing Eqs.~(\ref{eq:qdotppp}) and (\ref{eq:qdotppp2}) for a series of cases with different reaction mechanisms.  This test series is meant to touch various pathways through the chemistry ODE solver involving mixing, fast and slow chemistry, extinction, and series and parallel reactions.  The result are presented in Fig.~\ref{hrrpuv_reac_figures}.  The measure of correctness is that the black dots (hrrpuv), taken from Eq.~(\ref{eq:qdotppp}), exactly match with the sum of the individual reaction HRR curves denoted by the solid black line, Eq.~(\ref{eq:qdotppp2}). Below we briefly describe the key features of each case.

\subsubsection{Single Reaction (\textct{hrrpuv\_reac\_single})} This is a single reaction with specified lumped species without extinction.

\subsubsection{Series Reactions (\textct{hrrpuv\_reac\_series})} This is a set of series reactions with primitive species.

\subsubsection{Simple Reaction (\textct{hrrpuv\_reac\_simple})} This is FDS Simple Chemistry integrated using two Forward Euler substeps.

\subsubsection{Reaction with Extinction (\textct{hrrpuv\_reac\_extinction})} This is a single reaction with specified lumped species with extinction.

\subsubsection{Parallel Reactions (\textct{hrrpuv\_reac\_parallel})} This is a set of parallel reactions with two fuels going to one set of products.

\subsubsection{Parallel Reactions (\textct{hrrpuv\_reac\_parallel\_2})} This is a set of parallel reactions with one fuel going to two products.

\subsubsection{Arrhenius Reaction (\textct{hrrpuv\_reac\_arrhenius})} This is simple Arrhenius rate law using the default ODE integrator for finite-rate chemistry, which is RK4.

\subsubsection{Soot Production (\textct{hrrpuv\_reac\_soot})} This example combines a fast reaction for the primary reaction with finite-rate chemistry for the soot oxidation reaction.


\begin{figure}[p]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_single} &
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_series} \\
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_simple} &
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_extinction} \\
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_parallel} &
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_parallel_2} \\
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_arrhenius} &
\includegraphics[height=2.15in]{SCRIPT_FIGURES/hrrpuv_reac_soot}
\end{tabular*}
\caption[Results of the {\ct hrrpuv\_reac} test cases]{Heat release rate per unit volume for the various {\ct hrrpuv\_reac} test cases.}
\label{hrrpuv_reac_figures}
\end{figure}



\section{Mixture Fraction (\textct{burke\_schumann})}
\label{Mix_Frac}
\label{burke_schumann_spec}
\label{burke_schumann_temp}

For simple one-step reactions of the form F + O $\rightarrow$ P, there is an optional output quantity called the mixture fraction. To test that this output is correctly implemented we consider a set of methane-air mixtures in a test chamber that span the entire range of equivalence ratio. The complete combustion of methane is given by:
\begin{equation}\label{eq:methane_ex2}
\underbrace{\mathrm{CH_4}}_{\rm Fuel} + \underbrace{\mathrm{2\,(O_2 + 3.76\,N_2)}}_{\rm Oxidizer} \rightarrow  \underbrace{\mathrm{CO_2 + 2\, H_2O + 7.52\,N_2}}_{\rm Products}
\end{equation}
The simulation results are compared to state relationships that express temperature and species as a function of the mixture fraction, $f$~\cite{Turns:1996}. For fuel rich mixtures ($f_{\rm stoic} < f \le 1$), the expected species mass fractions are:
\begin{align}\label{eq:mix_relate_rich}
Y_{\rm F} &= \frac{f-f_{\rm stoich}}{1-f_{\rm stoich}} \\
Y_{\rm O} &= 0 \\
Y_{\rm P} &= \frac{1-f}{1-f_{\rm stoich}}
\end{align}
For fuel lean mixtures ($0 \le f < f_{\rm stoich}$):
\begin{align}\label{eq:mix_relate_lean}
Y_{\rm F} &= 0 \\
Y_{\rm O} &= 1- \frac{f}{f_{\rm stoich}} \\
Y_{\rm P} &= \frac{f}{f_{\rm stoich}}
\end{align}
Figure~\ref{fig:burke_schumann_spec} demonstrates that the predicted final fuel, oxidizer, and product mass fractions obey the ideal state relations. The state relation for temperature is given by:
\begin{equation}\label{eq:mix_relate_temp}
T = T_0 +  (f-Y_{\rm F}(f)) \, \frac{\Delta h_{\rm c}}{c_{v}}
\end{equation}
The specific heat, $c_p$, for each species is set to 1~\si{kJ/(kg.K)} as in the analysis by Turns~\cite{Turns:1996}. The enthalpy of formation of each of the species except for the fuel is set to zero, such that the heat of combustion of the reaction equals the heat of formation of the fuel. To obtain true adiabatic conditions in FDS, these cases were conducted inside a constant-volume reactor, so Eq.~(\ref{eq:mix_relate_temp}) is based on $c_v$ rather than $c_p$. We use the  following relationship $c_v = c_p - R/W$ to determine $c_v$. The molecular weight of the species were not assumed to be uniform; thus, the average molecular weight and $c_v$ vary with the mixture fraction. As a result, the traditional linear temperature profile is not expected.  The FDS result is shown in Fig.~\ref{fig:burke_schumann_temp}.

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/burke_schumann_spec}
\caption[Mixture fraction state relations for species (\textct{burke\_schumann})]{(Left) Lumped species mass fractions as a function of mixture fraction.}
\label{fig:burke_schumann_spec}
\end{figure}

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/burke_schumann_temp}
\caption[Mixture fraction state relations for temperature (\textct{burke\_schumann})]{Non-dimensional temperature, $(T-T_0)/(T_{\rm stoich} - T_0)$, as a function of the mixture fraction.}
\label{fig:burke_schumann_temp}
\end{figure}



\section{Ideal and Non-Ideal Heat of Combustion (\textct{HoC})}
\label{HoC}
\label{HoC_Ideal}
\label{HoC_NonIdeal}

When using a non-predefined fuel, one may have heat of combustion data representing complete combustion but species yield data representing typical large scale conditions.  When using simple chemistry, the input keyword \textct{IDEAL=.TRUE.} on the \textct{REAC} line will have FDS reduce the heat of combustion to account for any minor products of combustion (e.g., CO and H$_2$O).  This is done by removing energy from the heat of combustion to account for carbon that goes to CO and soot rather than CO$_2$ and for hydrogen that goes to soot rather than H$_2$O.  A custom fuel (methane) is defined with CO and soot yields of 0.1, a heat of combustion of 50000 kJ/kg, and a 40 kW fire.  Two input files are created, one with the \textct{HEAT\_OF\_COMBUSTION} defined with \textct{IDEAL=.TRUE.} and the second with \textct{IDEAL=.FALSE.}.  In the \textct{IDEAL=.FALSE.} case where the heat of combustion is not adjusted we expect a fuel mass flow rate of 0.0008 \si{kg/(m^2.s)}.  With the heat of combustion adjusted we expect a higher fuel mass flow rate of 0.000877 \si{kg/(m^2.s)}, as shown in Fig.~\ref{fig:HoC}.
\begin{figure}[h!]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HoC_Ideal} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HoC_NonIdeal}
\end{tabular*}
\caption[\textct{HoC\_Ideal} and \textct{HoC\_NonIdeal} test cases]{Demonstration of correct adjust to heat of combustion for minor products of combustion.}
\label{fig:HoC}
\end{figure}



\section{Fractional Effective Dose (FED) and Fractional Irritant Concentration (FIC) (\texorpdfstring{\textct{FED\_FIC}}{FED\_FIC}) }
\label{FED_FIC}
\label{FED_FIC_SMIX}

The Fractional Effective Dose index (FED), developed by Purser~\cite{SFPE:Purser}, is a commonly used measure of human incapacitation
due to the combustion gases. The FED value is calculated as
\be
\mathrm{FED}_\mathrm{tot} = (\mathrm{FED}_\mathrm{CO} + \mathrm{FED}_\mathrm{CN} + \mathrm{FED}_\mathrm{NO_x} + \mathrm{FLD}_\mathrm{irr}) \times \mathrm{HV}_\mathrm{CO_2} + \mathrm{FED}_\mathrm{O_2}
\ee
The fraction of an incapacitating dose of CO is calculated as
\be
\mathrm{FED}_\mathrm{CO} = \int_0^t 2.764 \times 10^{-5} \, (C_\mathrm{CO}(t))^{1.036} \, \d t
\ee
where $t$ is time (min), and $C_\mathrm{CO}$ is the CO concentration (ppm). The fraction of an incapacitating dose of CN is calculated as
\be
\mathrm{FED}_\mathrm{CN} = \int_0^t \left( \frac{\exp\left( \frac{C_\mathrm{CN}(t)}{43} \right)}{220} - 0.0045 \right) \, \d t
\ee
where $t$ is time (min), and $C_\mathrm{CN}$ is the concentration (ppm) of HCN corrected for the protective effect of NO$_\mathrm{2}$. $C_\mathrm{CN}$ is calculated as
\be
C_\mathrm{CN} = C_\mathrm{HCN} - C_\mathrm{NO_2}
\ee
The fraction of an incapacitating dose of NO$_x$ is calculated as
\be
\mathrm{FED}_\mathrm{NO_x} = \int_0^t \frac{C_\mathrm{NO_x}(t)}{1500} \, \d t
\ee
where $t$ is time (min), and $C_\mathrm{NO_x}$ is the sum of NO and NO$_\mathrm{2}$ concentrations (ppm).
The Fractional Lethal Dose (FLD) of irritants is calculated as
\be
\mathrm{FLD}_\mathrm{irr} = \int_0^t \left(
    \frac{C_\mathrm{HCl}(t)}    {F_\mathrm{FLD,HCl}} +
    \frac{C_\mathrm{HBr}(t)}    {F_\mathrm{FLD,HBr}} +
    \frac{C_\mathrm{HF}(t)}     {F_\mathrm{FLD,HF}} +
    \frac{C_\mathrm{SO_2}(t)}   {F_\mathrm{FLD,SO_2}} +
    \frac{C_\mathrm{NO_2}(t)}   {F_\mathrm{FLD,NO_2}} +
    \frac{C_\mathrm{C_3H_4O}(t)}{F_\mathrm{FLD,C_3H_4O}} +
    \frac{C_\mathrm{CH_2O}(t)}  {F_\mathrm{FLD,CH_2O}}
    \right) \, \d t
\ee
where $t$ is time (min), the numerators are the instantaneous concentrations (ppm) of each irritant, and
the denominators are the exposure doses of respective irritants predicted to be lethal to half the population.
The lethal exposure doses~\cite{SFPE:Purser} are given in the table below.
\begin{center}
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline & HCl & HBr & HF & $\mathrm{SO_2}$ & $\mathrm{NO_2}$ & $\mathrm{C_3H_4O}$ & $\mathrm{CH_2O}$  \\ \hline \hline
F${}_\mathrm{FLD}$ (ppm $\times$ min) & 114000 & 114000 & 87000 & 12000 & 1900 & 4500 & 22500 \\
F${}_\mathrm{FIC}$ (ppm) & 900 & 900 & 900 & 120 & 350 & 20 & 30 \\ \hline
\end{tabular}
\end{center}
The fraction of an incapacitating dose of low O${}_2$ hypoxia is calculated as
\be
\mathrm{FED}_\mathrm{O_2} =  \int_0^t \frac{\d t}{\exp \left [ 8.13 - 0.54 \, (20.9 - C_\mathrm{O_2}(t)) \right ] }
\ee
where $t$ is time (min), and $C_\mathrm{O_2}$ is the O${}_2$ concentration (volume percent).
The hyperventilation factor induced by carbon dioxide is calculated as
\be
\mathrm{HV}_\mathrm{CO_2} = \frac{ \exp( 0.1930 \, C_\mathrm{CO_2}(t) +  2.0004 ) }{7.1} \label{co2hyp2}
\ee
where $t$ is time (min), and $C_\mathrm{CO_2}$ is the CO${}_2$ concentration (volume percent).

The Fractional Irritant Concentration (FIC), also developed by Purser~\cite{SFPE:Purser}, represents the toxic effect which
depends upon the immediate concentrations of irritants. The overall irritant concentration FIC is calculated as
\be
\mathrm{FIC}_\mathrm{irr} =
    \frac{C_\mathrm{HCl}(t)}    {F_\mathrm{FIC,HCl}} +
    \frac{C_\mathrm{HBr}(t)}    {F_\mathrm{FIC,HBr}} +
    \frac{C_\mathrm{HF}(t)}     {F_\mathrm{FIC,HF}} +
    \frac{C_\mathrm{SO_2}(t)}   {F_\mathrm{FIC,SO_2}} +
    \frac{C_\mathrm{NO_2}(t)}   {F_\mathrm{FIC,NO_2}} +
    \frac{C_\mathrm{C_3H_4O}(t)}{F_\mathrm{FIC,C_3H_4O}} +
    \frac{C_\mathrm{CH_2O}(t)}  {F_\mathrm{FIC,CH_2O}}
\ee
where the numerators are the instantaneous concentrations of each irritant, and the denominators are the concentrations of respective irritants
expected to cause incapacitation in half the population. The incapacitating concentrations~\cite{SFPE:Purser} are given in the table above.

The FED and FIC values were computed from specified constant gas concentrations for four cases using an external script.
The gas concentrations are listed in the table below. The concentrations are in ppm.
\begin{center}
\begin{tabular}{|l|l|l|l|l|}
\hline Case ID & O2, CO2, CO & Asphyxiants & Irritants & All Gases \\ \hline \hline
$\mathrm{O_2}$ & 97727 & 90218 & 209000 & 103055 \\ \hline
$\mathrm{CO_2}$ & 343066 & 19189 & 0 & 7463 \\ \hline
$\mathrm{CO}$ & 3242 & 2456 & 0 & 1660 \\ \hline
$\mathrm{NO}$ & 0 & 134.9 & 0 & 89.34 \\ \hline
$\mathrm{NO_2}$ & 0 & 0 & 1.139 & 0.569 \\ \hline
$\mathrm{HCN}$ & 0 & 265.3 & 0 & 204.0 \\ \hline
$\mathrm{HCl}$ & 0 & 0 & 68.33 & 34.17 \\ \hline
$\mathrm{HBr}$ & 0 & 0 & 68.33 & 34.17 \\ \hline
$\mathrm{HF}$ & 0 & 0 & 52.15 & 26.07 \\ \hline
$\mathrm{SO_2}$ & 0 & 0 & 7.193 & 3.596 \\ \hline
$\mathrm{C_3H_4O}$ & 0 & 0 & 2.697 & 1.349 \\ \hline
$\mathrm{CH_2O}$ & 0 & 0 & 13.49 & 6.743  \\ \hline
\end{tabular}
\end{center}

Two versions of the simulations are performed. In the first simulation, the species were defined as individual tracked species.
The FDS predictions and the expected FED and FIC values are compared in the figures below. In the second simulation, each species was defined as
a lumped species, being part of the mixture using \textct{SMIX}. Four different mixtures were defined. The results of this test are shown in
Figs.~\ref{FED_FIC_plot} and \ref{FED_FIC_SMIX_plot}.

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_O2_CO2_CO} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_Asphyxiants} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_Irritants} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_All_Gases} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_O2_CO2_CO} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_Asphyxiants} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_Irritants} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_All_Gases}
\end{tabular*}
\vskip-\baselineskip
\caption[The FED and FIC values in \textct{FED\_FIC} test cases]{Comparison of FED and FIC predictions with expected values.}
\label{FED_FIC_plot}
\end{figure}

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_SMIX_O2_CO2_CO} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_SMIX_Asphyxiants} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_SMIX_Irritants} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FED_SMIX_All_Gases} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_SMIX_O2_CO2_CO} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_SMIX_Asphyxiants} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_SMIX_Irritants} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/FIC_SMIX_All_Gases}
\end{tabular*}
\vskip-\baselineskip
\caption[The FED and FIC values in \textct{FED\_FIC\_SMIX} test cases]{Comparison of FED and FIC predictions with expected values using \textct{SMIX}.}
\label{FED_FIC_SMIX_plot}
\end{figure}


\section{Smoke Detector Model (\texorpdfstring{\textct{smoke\_detector}}{smoke\_detector}) }
\label{smoke_detector}

The calculations described in this section check the smoke detector algorithm that computes the smoke obscuration in the sensing chamber of a detector. For this example, the initial soot mass fraction in a 1~m$^3$ box is set as 100~mg/kg via the \textct{INIT} line. A vent on the left side injects soot at a velocity of 0.25~m/s and a mass fraction of 100~mg/kg, and the soot exhausts on the right side of the box via an open vent. By default, if a species is defined as an aerosol by setting \textct{AEROSOL=.TRUE.} on the \textct{SPEC} line, then all of the aerosol deposition mechanisms (gravitational, thermophoretic, and turbulent) will act upon that species. For this example, all deposition mechanisms are disabled by using the follows inputs on the \textct{MISC} line:

\begin{lstlisting}
&MISC GRAVITATIONAL_DEPOSITION  = .FALSE.
      THERMOPHORETIC_DEPOSITION = .FALSE.
      TURBULENT_DEPOSITION      = .FALSE. /
\end{lstlisting}

\noindent The transient mass fraction of smoke in the sensing chamber of the detector $Y_c$ is given as~\cite{FDS_Tech_Guide}
\be
\frac{\d Y_c }{\d t} = \frac{Y_e(t) - Y_c(t)}{L/\bu} \label{eq:HYoeq}
\ee
where $Y_e$ is the mass fraction of smoke in the free stream (kg/kg), $L$ is the characteristic length of the detector geometry (m), and $\bu$ is the free stream velocity (m/s). For a constant mass fraction of smoke in the free stream $Y_0$, Eq.~\ref{eq:HYoeq} has an analytical solution of the form
\be
Y_c(t) = Y_0 \left[ 1 - \exp \left(-\frac{t \bu}{L}\right) \right]
\ee
The resulting smoke mass fraction in the sensing chamber is converted into an obscuration by
\be
O[\text{\%/m}] = \left( 1 - e^{-\kappa \rho Y_c l} \right) \times 100
\ee
where $\kappa$ is the specific extinction coefficient, $\rho$ is the density of the external gases in the ceiling jet,
and $l$ is the preferred unit of length (1~m in this case).
Fig.~\ref{fig:smoke_detector} shows a comparison of the analytical and simulated results for the time evolution of the smoke detector chamber obscuration.

\begin{figure}[ht]
\centering
\begin{tabular}{c}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/smoke_detector}
\end{tabular}
\caption[Smoke detector chamber obscuration for \textct{smoke\_detector} case]{Time evolution of smoke detector chamber obscuration for \textct{smoke\_detector} case}
\label{fig:smoke_detector}
\end{figure}


\section{Aerosol Behavior}
\subsection{Gravitational Settling and Deposition of Aerosols\\(\texorpdfstring{\textct{aerosol\_gravitational\_deposition}}{aerosol\_gravitational\_deposition})}
	\label{aerosol_gravitational_deposition}

This verification test consists of two test cases. The second case, {\ct aerosol\_gravitational\_deposition\_2}, reverses the z-component of gravity. The case consists of a box 10~cm on side with adiabatic, free-slip side walls. The box is filled with two gas species each having a molecular weight of 28.8~g/mol, a viscosity of 0.00002~\si{kg/(m.s}, a thermal conductivity of 0.025~\si{W/(m.K}, and specific heat of 1~\si{kJ/(kg.K}, and zero diffusivity. One of the gas species is defined as an aerosol with a diameter of 100~$\mu$m, a solid phase density of 2000~kg/m$^3$, and a solid phase conductivity of 1~\si{W/(m.K}. The initial mass fraction of the aerosol is 0.00001. {\ct STRATIFICATION}, {\ct NOISE}, and all aerosol behaviors except for {\ct GRAVITATIONAL\_SETTLING} and {\ct GRAVITATIONAL\_DEPOSITION} are turned off. Since the box has a constant density over its height, a uniform settling rate over time is expected.

\begin{figure}[ht]
	\centering
	\begin{tabular}{c}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_gravitational_deposition_gas}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_gravitational_deposition_wall} \\
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_gravitational_deposition_2_gas}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_gravitational_deposition_2_wall}
	\end{tabular}
	\caption[Gas phase soot mass fractions and wall surface densities for gravitational deposition]{Time evolution of soot mass fraction in the gas (left) and soot surface density on the wall (right) for the \textct{aerosol\_gravitational\_deposition} (Top) and \textct{aerosol\_gravitational\_deposition\_2} (Bottom) cases.}
	\label{fig:gravitational_deposition}
\end{figure}

\subsection{Thermophoretic Settling and Deposition of Aerosols\\(\texorpdfstring{\textct{aerosol\_thermophoretic\_deposition}}{aerosol\_thermophoretic\_deposition})}
	\label{aerosol_thermophoretic_deposition}

This verification test consists of two test cases. The second case, {\ct aerosol\_thermophoretic\_deposition\_2}, reverses the temperature gradient. The case consists of a box 10~cm on side with adiabatic, free-slip side walls and a 100 K temperature gradient over the height of the box. The box is filled with two gas species each having a molecular weight of 28.8~g/mol, a viscosity of 0.00002~\si{kg/(m.s}, a thermal conductivity of 0.025~\si{W/(m.K}, and specific heat of 1~\si{kJ/(kg.K}, and zero diffusivity. One of the gas species is defined as an aerosol with a diameter of 1~$\mu$m, a solid phase density of 2000~kg/m$^3$, and a solid phase conductivity of 1~\si{W/(m.K}. The initial mass fraction of the aerosol is 0.00001. The gas temperature is initialized to its steady-state temperature gradient. {\ct STRATIFICATION}, {\ct NOISE}, and all aerosol behaviors except for {\ct THERMOPHORETIC\_SETTLING} and {\ct THERMOPHORETIC\_DEPOSITION} are turned off. Thermophoretic settling rates are weakly dependent on the gas density. Since there is a temperature gradient, the settlings rates are not uniform over the height of the box. Unlike the gravitational settling case, this means over long enough time periods the overall settling rate is not linear in time; however, for a short time period a near linear settling rate is expected and can be determined analytically

\begin{figure}[ht]
	\centering
	\begin{tabular}{c}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_thermophoretic_deposition_gas}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_thermophoretic_deposition_wall} \\
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_thermophoretic_deposition_2_gas}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_thermophoretic_deposition_2_wall}
	\end{tabular}
	\caption[Gas phase soot densities and wall surface densities for thermophoretic deposition]{Time evolution of soot density in the gas (left) and soot surface density on the wall (right) for the \textct{aerosol\_thermophoretic\_deposition} (Top) and \textct{aerosol\_thermophoretic\_deposition\_2} (Bottom) cases.}
	\label{fig:thermophoretic_deposition}
\end{figure}

\subsection{Turbulent Deposition of Aerosols (\texorpdfstring{\textct{aerosol\_turbulent\_deposition}}{aerosol\_turbulent\_deposition})}
	\label{aerosol_turbulent_deposition}

This verification test consists of three tunnel like geometries 10~cm on side with adiabatic, free-slip walls. One end of the tunnel is {\ct OPEN} and the other end has a constant inlet velocity of 0.001 m/s, 0.1 m/s, or 1 m/s. The tunnels are filled with two gas species each having a molecular weight of 28.8~g/mol, a viscosity of 0.00002~\si{kg/(m.s}, a thermal conductivity of 0.025~\si{W/(m.K}, and specific heat of 1~\si{kJ/(kg.K}, and zero diffusivity. One of the gas species is defined as an aerosol with a diameter of 100~$\mu$m, a solid phase density of 2000~kg/m$^3$, and a solid phase conductivity of 1~\si{W/(m.K}. The initial mass fraction of the aerosol is 0.00001. {\ct STRATIFICATION}, {\ct NOISE}, and all aerosol behaviors except for {\ct TURBULENT\_DEPOSITION} are turned off. Turbulent deposition is computed using a correlation based open the wall friction velocity and the wall dimensionless stopping distance. The correlation has three parts, and the selected velocities test each part. Since the inlet condition is a constant velocity with a constant aerosol mass fraction, the first wall cell after the inlet will see a uniform settling rate over time.

\begin{figure}[ht]
	\centering
	\begin{tabular}{c}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_turbulent_deposition_1_wall}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_turbulent_deposition_2_wall} \\
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_turbulent_deposition_3_wall}
	\end{tabular}
	\caption[Wall surface densities for the \textct{aerosol\_turbulent\_deposition} case]{Time evolution of soot surface density on the wall for the \textct{aerosol\_turbulent\_deposition}. Top left is the diffusion regime, top right is the diffusion-impaction regime, and bottom is the inertial regime.}
	\label{fig:turbulent_deposition}
\end{figure}

\subsection{Mass Conservation of Depositing Aerosols (\texorpdfstring{\textct{propane\_flame\_deposition}}{propane\_flame\_deposition})}
\label{propane_flame_deposition}

The calculations described in this section check the conservation of mass for the aerosol deposition algorithms. The example involves a reaction that invokes the aerosol deposition model in FDS (i.e., soot deposition). For this example, the fuel will be propane with a peak heat release rate of 100~kW and a 5~\% soot yield. For a 100~kW propane fire (\textct{HEAT\_OF\_COMBUSTION} of 44,715~kJ/kg), the associated burning rate is 2.236~g/s. A \textct{RAMP} is used to specify a burning rate from a propane burner that ramps up linearly to 2.236~g/s from 0~s to 1~s, remains steady at 2.236~g/s from 1~s to 4~s, then linearly decreases to 0~g/s from 4~s to 5~s. The total fuel mass released is 8.944~g of propane. Therefore, the resulting mass of soot should be equal to 0.447~g, or 5~\% of the total amount of fuel. For a case with no aerosol deposition, we would expect the mass of soot in the gas phase to be equal to 0.447~g. For a case with aerosol deposition, we would expect some fraction of soot to exist in the gas phase and the remainder of soot to be deposited on the wall. The sum of soot in the gas phase and deposited soot should be 0.447~g.

Figure~\ref{fig:deposition_mass} shows the time evolution of soot in the gas phase, deposited soot, and total soot (sum of soot in the gas phase and deposited soot) for five cases. The five cases are (1) all aerosol deposition mechanisms active, (2) no aerosol deposition mechanisms active, (3) gravitational deposition only, (4) thermophoretic deposition only, and (5) turbulent deposition only.

\begin{figure}[ht]
	\centering
	\begin{tabular}{c}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/propane_flame_deposition_gas}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/propane_flame_deposition_wall} \\
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/propane_flame_deposition_total}
	\end{tabular}
	\caption[Soot mass conservation for \textct{propane\_flame\_deposition} case]{Time evolution of soot mass components for \textct{propane\_flame\_deposition} cases. (Top left) Mass of soot in gas phase. (Top right) Mass of soot deposited on walls. (Bottom) Total mass of soot in gas phase and deposited on walls.}
	\label{fig:deposition_mass}
\end{figure}

\subsection{Agglomeration of Aerosols (\texorpdfstring{\textct{aerosol\_agglomeration}}{aerosol\_agglomeration})}
	\label{aerosol_agglomeration}

This verification case consists of two test cases.

The first case to be discussed consists of a box 10~cm on side with adiabatic, free-slip side walls. The box is filled with two gas species each having a molecular weight of 28.8~g/mol, a viscosity of 0.00002~\si{kg/(m.s}, a thermal conductivity of 0.025~\si{W/(m.K}, and specific heat of 1~\si{kJ/(kg.K}, and zero diffusivity. One of the gas species is defined as an aerosol with two particle size bins with a minimum diameter of 1~$\mu$m and a maximum diameter of 10~$\mu$m, a solid phase density of 2000~kg/m$^3$, and a solid phase conductivity of 1~\si{W/(m.K}. The initial mass fraction of the first size bin of the aerosol is 0.00001. {\ct STRATIFICATION}, {\ct NOISE}, and all aerosol behaviors except for {\ct AGGLOMERATION} are turned off. In this case the only mechanisms operating are Brownian and gravitational agglomeration. The case is run for 60 s.

\begin{figure}[ht]
	\centering
	\begin{tabular}{c}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_agglomeration_bin1}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_agglomeration_bin2}
	\end{tabular}
	\caption[Gas phase soot mass fractions the \textct{aerosol\_agglomeration} cases]{Time evolution of soot mass fraction in the gas for size bin 1 and both bins (left) and size bin 2 (right) for the \textct{aerosol\_agglomeration} case.}
	\label{fig:agglomeration}
\end{figure}

In the second case three pairs of small (3~mm by 3~mm) vents are placed on opposite corners of the the walls, floor, and ceiling of the box. Each pair is connected by an HVAC duct that blows air at 1~m/s at the face of the vents. The average dissipation rate in the box is 0.0204~m$^2$/s$^3$. Using the average dissipation rate, the agglomeration rate is computed and the resulting mass fractions are compared against the volume averaged mass fractions computed by FDS.

\begin{figure}[ht]
	\centering
	\begin{tabular}{c}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_agglomeration_2_bin1}
		\includegraphics[height=2.2in]{SCRIPT_FIGURES/aerosol_agglomeration_2_bin2}
	\end{tabular}
	\caption[Gas phase soot mass fractions the \textct{aerosol\_agglomeration\_2} cases]{Time evolution of soot mass fraction in the gas for size bin 1 and both bins (left) and size bin 2 (right) for the \textct{aerosol\_agglomeration\_2} case.}
	\label{fig:agglomeration_2}
\end{figure}

\chapter{Heat Conduction}

This chapter contains examples that test the one-dimensional heat conduction solver in FDS.
A one-dimensional heat conduction equation for the solid phase
temperature $T_{\rm s}(x,t)$ is applied in the direction $x$ pointing into
the solid (the point $x = 0$ represents the surface)
\be
  \rho_{\rm s} c_{\rm s} \; \dod{T_{\rm s}}{t} = \dod{}{x} k_{\rm s} \dod{T_{\rm s}}{x} + \dq_{\rm s}'''
  \label{1dheat}
\ee
In cylindrical and spherical coordinates, the heat conduction equation is written
\be
  \rho_{\rm s} c_{\rm s} \; \dod{T_{\rm s}}{t} = \frac{1}{r} \, \dod{}{r}
  \left(rk_{\rm s} \dod{T_{\rm s}}{r} \right)+\dq_{\rm s}'''
  \label{1dheatcyl} \quad ; \quad
  \rho_{\rm s} c_{\rm s} \; \dod{T_{\rm s}}{t} = \frac{1}{r^2} \, \dod{}{r}
  \left(r^2k_{\rm s} \dod{T_{\rm s}}{r} \right)+\dq_{\rm s}'''
\ee
FDS offers the user these options, with the assumption that the
obstruction is not actually rectilinear, but rather cylindrical or
spherical in shape. This option is useful in describing the behavior
of small, complicated ``targets'' like cables or heat detection
devices.




\section{Heat Conduction Through a Solid Slab (\texorpdfstring{\textct{heat\_conduction}}{heat\_conduction})}
\label{heat_conduction_a}
\label{heat_conduction_b}
\label{heat_conduction_c}
\label{heat_conduction_d}

Analytical solutions of transient, one-dimensional heat conduction through a slab can be found in Refs.~\cite{Drysdale:1} and \cite{Carslaw:1}. Four
cases are examined here. In each, a slab of thickness $L=0.1$~m is exposed on one face to an air temperature of $T_g=120$~\si{\degree C}. The other face
is insulated (adiabatic). The convective heat transfer from the gas to the slab is $\dq_c'' = h \, (T_g - T_{\rm s})$, where $h$ is constant, and $T_{\rm s}$ is
the slab face temperature. No thermal radiation is included.
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
Case  &  $k$      & $\rho$       &  $c$          &   $h$         &  Bi     \\
      & (\si{W/(m.K)})  & (\si{kg/m^3})   &  (\si{kJ/(kg.K)})    &  (\si{W/(m^2.K)})  &  $hL/k$ \\ \hline \hline
A     &   0.1     & 100          &  1            &  100          &  100    \\ \hline
B     &   0.1     & 100          &  1            &  10           &  10     \\ \hline
C     &   1.0     & 1000         &  1            &  10           &  1      \\ \hline
D     &  10.0     & 10000        &  1            &  10           & 0.1     \\ \hline
\end{tabular}
\end{center}

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/heat_conduction_a} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/heat_conduction_b} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/heat_conduction_c} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/heat_conduction_d}
\end{tabular*}
\caption[The \textct{heat\_conduction} test cases]{Comparison of heat conduction calculations with analytical solutions.}
\label{heat_conduction}
\end{figure}



\section{Temperature-Dependent Thermal Properties (\texorpdfstring{\textct{heat\_conduction\_kc}}{heat\_conduction\_kc})}
\label{heat_conduction_kc}

This example demonstrates the 1D heat conduction in Cartesian, cylindrical, and spherical geometries with temperature-dependent thermal properties.
The Cartesian solution was computed using HEATING (version~7.3), a multi-dimensional, finite-difference, general purpose heat transfer
model~\cite{Childs}. The cylindrical and spherical solutions were computed using a commercial finite-element solver, ABAQUS.

The sample of homogeneous material is initially at 0~\si{\degree C} and at $t>0$ exposed to a gas at 700~\si{\degree C}. A fixed heat transfer coefficient of
10~\si{W/(m^2.K)} is assumed. The density of the material is 10,000~\si{kg/m^3}. The conductivity and specific heat are functions of temperature with the
following values: $k(0)=0.10$~\si{W/(m.K)}, $k(200)=0.20$~\si{W/(m.K)}, $c(0)=1.0$~\si{kJ/(kg.K)}, $c(100)=1.2$~\si{kJ/(kg.K)}, $c(200)=1.0$~\si{kJ/(kg.K)}. The thickness (radius) of
the sample is 0.01~m. In the Cartesian case, the back surface of the material is exposed to a gas at 0~\si{\degree C}. In the figure below, the solid
lines are FDS results and the circles are the HEATING results. An example input with cylindrical geometry looks like:

\begin{lstlisting}
&MATL ID='MAT_1'
      EMISSIVITY = 0.0
      CONDUCTIVITY_RAMP='K_RAMP'
      SPECIFIC_HEAT_RAMP = 'C_RAMP'
      DENSITY=10000. /

&RAMP ID = 'K_RAMP' T=0,   F= 0.10 /
&RAMP ID = 'K_RAMP' T=100, F= 0.15 /
&RAMP ID = 'K_RAMP' T=200, F= 0.20 /
&RAMP ID = 'C_RAMP' T=0,   F= 1.00 /
&RAMP ID = 'C_RAMP' T=100, F= 1.20 /
&RAMP ID = 'C_RAMP' T=200, F= 1.00 /

&SURF ID='SLAB'
      STRETCH_FACTOR = 1.0
      GEOMETRY = 'CYLINDRICAL'
      MATL_ID='MAT_1'
      THICKNESS=0.01 /
\end{lstlisting}

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/heat_conduction_kc_surf} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/heat_conduction_kc_back}
\end{tabular*}
\caption[The \textct{heat\_conduction\_kc} test case]{Comparison of heat conduction calculations with a finite-element model.}
\label{heat_conduction_kc_fig}
\end{figure}


\section{Convective Cooling (\texorpdfstring{\textct{convective\_cooling}}{convective\_cooling})}
\label{convective_cooling}

This example tests the convective cooling algorithm. A 1~m thick solid slab that is initially at 1000~\si{\degree C} is suddenly exposed to air at 0~\si{\degree C}. The back of the slab is insulated. Its density is 1000~\si{kg/m^3}, its specific heat is 0.001~kJ/(kg$\cdot$K), its conductivity is 1~W/(m$\cdot$K), and its emissivity is zero, meaning there is no radiative loss from the surface. The convective heat transfer coefficient is 1~W/(m$^2\cdot$K). The predicted and exact temperature values at the back side of the slab are displayed in Fig.~\ref{convective_cooling_fig}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/convective_cooling}
\caption[The \textct{convective\_cooling} test case]{Predicted vs.~exact back side temperatures of a thick slab cooled by convection alone.}
\label{convective_cooling_fig}
\end{figure}

To test the second-order accuracy of the solid phase conduction algorithm, this case was run with increasingly finer spatial and temporal resolution. The resulting convergence study is displayed in Fig.~\ref{convective_cooling_convergence}. The plot shows the relative difference between the computed and exact solution at 1800~s as a function of grid size.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/convective_cooling_error}
\caption[Convergence study for the \textct{convective\_cooling} test case]{Convergence study for the \textct{convective\_cooling} test case.}
\label{convective_cooling_convergence}
\end{figure}



\section{Simple Thermocouple Model (\texorpdfstring{\textct{thermocouples}}{thermocouples})}
\label{thermocouples}

This example tests the simple thermocouple model in FDS. It consists of a box whose walls and gas temperatures are fixed at 500~\si{\degree C}. Inside the box are three thermocouples with bead diameters of 1~mm, 2~mm, and 3~mm. Also included in the box are three ``targets'' -- small solid objects whose surfaces are assumed to be composed of small spheres of the same diameter as the thermocouples. Figure~\ref{thermocouples_fig} compares the temperature rise of the objects. The thermocouple model is not compared with an analytical solutions. This is simply a comparison of the thermally thin thermocouple calculation with the thermally thick ``target'' calculation. Small differences in temperature are due to slightly different flow conditions in different regions of the box and numerical error due to node spacing and time step size.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/thermocouples}
\caption[The \textct{thermocouples} test case]{Comparison of thermally thin and thick heat conduction into a small sphere.}
\label{thermocouples_fig}
\end{figure}



\section{Heat Conduction through Insulated Steel (\texorpdfstring{\textct{insulated\_steel\_x}}{insulated\_steel\_x})}
\label{insulated_steel_pipe}
\label{insulated_steel_plate}

In these examples, a 1~cm thick steel plate and pipe are coated on each side with 2~cm thick insulation material. The conductivity, specific heat, and density of the steel are 50~\si{W/(m.K)}, 0.5~\si{kJ/(kg.K)}, and 7500~\si{kg/m^3}, respectively. The corresponding values for the insulation material are 0.2~\si{W/(m.K)}, 1~\si{kJ/(kg.K)}, and 200~\si{kg/m^3}, respectively. The heat transfer coefficient is 10~\si{W/(m^2.K)}. The outer surface of the composite is exposed to air at 480~\si{\degree C} while the inner surface is exposed to air at 20~\si{\degree C}. The assemblies are heated for 10~h and the steady-state temperature profiles are shown in Fig.~\ref{insulated_steel_fig}. Neglecting thermal radiation, the heat flux through the plate is given by~\cite{Incropera:1}:
\be
   \dot{q}'' = \frac{ T_{\hbox{\tiny hot}} - T_{\hbox{\tiny cold}} }{ \frac{1}{h} + \frac{L_{\hbox{\tiny ins}}}{k_{\hbox{\tiny ins}}} + \frac{L_{\hbox{\tiny steel}}}{k_{\hbox{\tiny steel}}} + \frac{L_{\hbox{\tiny ins}}}{k_{\hbox{\tiny ins}}} +\frac{1}{h}}
\ee
where $h$ is the heat transfer coefficient, $L$ is the layer thickness, and $k$ is the thermal conductivity of the layer material. The heat flux through the inner surface of the pipe, $r_1$, is given by:
\be
   \dot{q}'' = \frac{ T_{\hbox{\tiny hot}} - T_{\hbox{\tiny cold}} }{ \frac{1}{h} + \frac{r_1}{k_{\hbox{\tiny ins}}} \ln \frac{r_2}{r_1} + \frac{r_1}{k_{\hbox{\tiny steel}}} \ln \frac{r_3}{r_2} + \frac{r_1}{k_{\hbox{\tiny ins}}} \ln \frac{r_4}{r_3} + \frac{r_1}{r_4} \frac{1}{h} }
\ee
where $r_1$ is the inner radius of the inner layer of insulation, $r_2$ is the inner radius of the steel, $r_3$ is the outer radius of the steel, and $r_4$ is the outer radius of the outer layer of insulation. The heat flux through each layer is the same, and the steady-state solution can be obtained by solving for the temperature drop across each layer. The temperature gradient within each layer of the plate composite is linear. For the pipe, the temperature profile for each layer is:
\be
   T(r) = T_{s,i} + \frac{ T_{s,i-1} - T_{s,i} }{ \ln (r_{i-1}/r_i) } \ln \frac{r}{r_i} \quad \quad i=2,3,4
\ee
where $T_{s,i}$ is the surface temperature corresponding to radial coordinates 1 through 4. Note that the position of the symbols in Fig.~\ref{insulated_steel_fig} indicates the default finite difference nodes of the solid. Also note that the spatial coordinate refers to the distance from the outer (hot) surface of insulation.

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/insulated_steel_plate} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/insulated_steel_pipe}
\end{tabular*}
\caption[The \textct{insulated\_steel} test cases]{Steady-state temperature profile within an insulated steel plate and pipe.}
\label{insulated_steel_fig}
\end{figure}



\section{Heat Conduction across Mesh Boundaries (\texorpdfstring{\textct{back\_wall\_test}}{back\_wall\_test})}
\label{back_wall_test}

In this example, a unit cube made of 0.5~cm thick steel has several of its sides aligned with mesh interfaces. There is a solid cube centered inside the box with a fixed temperature of 500~$^\circ$C. The objective of the test is to ensure that the heat conduction through the steel and across the mesh boundaries is computed properly. In the left hand plot of Fig.~\ref{back_wall_test_fig}, the net radiative heat flux to the interior surface of the box matches the net radiative heat flux from the external surface in steady state. In the right hand plot, the external surface temperature of two sides of the box are compared. One side is a zero cell thick obstruction; the other side is a one cell thick obstruction. Since the sides are all assumed to be 0.5~cm thick, the fact that the obstruction is either zero or one cell thick should not matter and the temperatures should match exactly.

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/back_wall_test_flux} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/back_wall_test_temp}
\end{tabular*}
\caption[The \textct{back\_wall\_test} test case]{(Left) The heat flux into and out of a steel plate. (Right) The external temperature of a steel box whose sides are either zero or one cell thick.}
\label{back_wall_test_fig}
\end{figure}



\section{Specified Heat Flux Boundary Conditions (\texorpdfstring{\textct{adiabatic\_xxx\_flux}}{adiabatic\_xxx\_flux})}
\label{adiabatic_con_flux}
\label{adiabatic_net_flux}

There are options in FDS to specify either a net (convective and radiative) or convective boundary condition at a solid surface. In these two test cases, \textct{Heat\_Transfer/adiabatic\_con\_flux.fds} and \textct{Heat\_Transfer/adiabatic\_net\_flux.fds}, a sealed cube of side length 2~m has a 0.4~m by 0.4~m area on the floor with a specified convective and net heat flux of 100~kW/m$^2$. The case with the specified convective heat flux boundary has the radiation turned off. The case with the net heat flux boundary has both convection and radiation enabled so that the net flux is 100~kW/m$^2$. The flux is applied for 30~s and then turned off. The pressure in the compartment is expected to rise according to the equation:
\be
   \frac{\d p}{\d t} = \frac{(\gamma-1) \, \dot{Q}}{V}
\ee
where $\dot{Q}=16$~kW, $\gamma=1.4$, and $V=8$~m$^3$. After 30~s, the pressure rise, $p$, is expected to be 24~kPa (left, Fig.~\ref{adiabatic_flux}). The expected temperature rise, $\Delta T$, is found by solving the energy conservation equation:
\be
   \dot{Q} \, \Delta t = c_p \, \rho \, V \, \Delta T - V \, \Delta p
\ee
as shown in the right hand plots of Fig.~\ref{adiabatic_flux}.

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/adiabatic_con_flux_pres} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/adiabatic_con_flux_temp} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/adiabatic_net_flux_pres} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/adiabatic_net_flux_temp}
\end{tabular*}
\caption[The \textct{adiabatic\_con\_flux} and \textct{adiabatic\_net\_flux} test cases]{Pressure and average temperature of a small compartment with specified heat flux boundary conditions.}
\label{adiabatic_flux}
\end{figure}

\newpage

\clearpage

\section{Solid Heat Transfer 3D (Beta)}
\label{sec:ht3d}

This section presents test cases for solid phase heat diffusion (conduction) in 3D.  This feature is not yet connected to the 1D pyrolysis heat transfer code discussed in the previous sections.  Currently, the purpose of the HT3D functionality is to couple FDS with structural fire calculations.

\subsection{3D vs 1D Heat Transfer (\texorpdfstring{\textct{ht3d\_vs\_ht1d}}{ht3d\_vs\_ht1d})}
\label{ht3d_vs_ht1d}

This case checks that the 3D heat conduction algorithm matches the 1D algorithm for a configuration that is only 1D. Consider a $\delta=0.02$~m thick block of tungsten that is insulated on the sides and back and exposed to $\dot{q}''=1350$~kW/m$^2$ for $\Delta t=7.15$~s. The density of tungsten is $\rho=19250$~kg/m$^3$ and the specific heat $c=0.132$~kJ/(kg$\cdot$K). Given an ambient temperature of $T_0=20$~$^\circ$C, the temperature of the block is expected to rise to:
\be
   T = T_0 + \frac{ \dot{q}'' \, \Delta t}{\delta \, c \, \rho} \approx 209.9 \; ^\circ \hbox{C}
\ee
as shown in Fig.~\ref{fig:ht3d_vs_ht1d}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/ht3d_vs_ht1d}
\caption[The \textct{ht3d\_vs\_ht1d} test case]{Comparison of the temperature rise based on a 3-D and 1-D heat conduction calculation.}
\label{fig:ht3d_vs_ht1d}
\end{figure}

\FloatBarrier


\subsection{1D Heat Diffusion in a Square Bar (\texorpdfstring{\textct{ht3d\_nx\_x}}{ht3d\_nx\_x})}
\label{sec:heat_diff}
\label{ht3d_nx_10}
\label{ht3d_nx_20}
\label{ht3d_nx_40}
\label{ht3d_nx_80}
\label{ht3d_nx_160}
\label{ht3d_ny_10}
\label{ht3d_ny_20}
\label{ht3d_ny_40}
\label{ht3d_ny_80}
\label{ht3d_ny_160}
\label{ht3d_nz_10}
\label{ht3d_nz_20}
\label{ht3d_nz_40}
\label{ht3d_nz_80}
\label{ht3d_nz_160}

This test case is an initial value problem for the heat equation in 1D.  In FDS, a square bar of length $L=1\;\si{m}$ is initialized with a sine profile that decays exponentially in time.  The temperature baseline is $T_0 = 20 \;\si{\degree C}$.  The Dirichlet boundary conditions at each end of the bar are set to $T_0$.  The initial amplitude of the wave is $A = 100 \;\si{\degree C}$ and the starting position of the bar is $x_0 = -0.5 \;\si{m}$.  The thermal properties of the material are set to give a thermal diffusivity of $\alpha = 1 \;\si{m^2/s}$.  The solution to this problem is given by \cite{Crank:1}
\begin{equation}
\label{eq:expdecay}
T(x,t) = T_0 + A \sin(\lambda(x-x_0)) \exp(-\lambda^2 \alpha t)
\end{equation}
where $\lambda = 2\pi/L$.

Figure \ref{fig:ht3d_diff} shows the results of the FDS convergence study for each coordinate direction.  The left plot shows the spatial profiles at the initial (dashed line) and final states for the various resolutions.  The grid spacing is $\Delta x = L/nx$.  The right plot shows second-order convergence of the L2 error.  Note that even though the time integration scheme is explicit Euler (first order in time) the spatial convergence remains second order by virtue of the Von Neumann time step restriction $\Delta t < \Delta x^2/(2\alpha)$.

\begin{figure}[ht]
\centering
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}

\includegraphics[height=2.2in]{SCRIPT_FIGURES/ht3d_test_1_profile} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/ht3d_test_1_convergence} \\
\end{tabular*}
\caption[The \textct{ht3d\_nx\_x} test cases]{One-dimensional heat diffusion in a square bar. (Left) Initial and final profiles for each case.  (Right) Spatial order-of-accuracy plot showing second-order convergence for all three spatial directions.}
\label{fig:ht3d_diff}
\end{figure}

\FloatBarrier


\subsection{Continuous Heat Flux Boundary (\texorpdfstring{\textct{ht3d\_slab}}{ht3d\_slab})}
\label{ht3d_slab}

In this test case, we utilize the non-steady state conduction solution provided in Carslaw and Jaeger \cite{Carslaw:1} for a semi-infinite slab exposed to a constant ambient temperature, $T_\infty$, with a constant convective heat transfer coefficient, $h$, and no radiation (see also Drysdale \cite{Drysdale:1}, Eq.~(2.25)).  The initial temperature of the slab, $T_0$, is set to \SI{1000}{\degreeCelsius}. The thermal properties of the slab, $k=1$ \si{W/(m.K)}, $\rho=1000$ \si{kg/m^3}, and $c=0.001$ \si{kJ/(kg.K)}, are set to give a thermal diffusivity, $\alpha$, of 0.001 \si{m^2/s}. The analytical solution for this problem for the solid temperature, $T(x,t)$, is given by
\begin{equation}
\label{eq:semiinfslab}
\frac{T - T_0}{T_\infty - T_0} = \erfc\left(\frac{x}{2\sqrt{\alpha t}}\right) - \exp\left( \frac{xh}{k} + \frac{\alpha t}{(k/h)^2} \right) \erfc\left( \frac{x}{2\sqrt{\alpha t}} + \frac{\sqrt{\alpha t}}{k/h} \right)
\end{equation}
where $\erfc = 1 - \erf(x)$.

This is a 1D problem in depth into the solid.  In FDS, the problem is solved in 2D, with the temperature varying in the $x$ coordinate direction; there is no variation in the vertical, $z$, direction.  While the solution is provided for a semi-infinite slab, FDS must use a finite thickness.  The slab is taken to be 0.5 m in depth, with $x=0$ m marking the interface location between the fluid and the solid.  The analytical solution for $T(x=0.5,t)$ is used as the ``back'' boundary condition of the slab.  The grid resolution is chosen to be 5 cm (10 cells covering 0.5 m).  The stability constraint for the time step in the heat equation is therefore, $\delta t \le \delta x^2/(2\alpha) = 1.25$ s.  This is set as the initial time step in FDS, since no gas phase solution is computed.

The main purpose of this verification case is to check the accuracy of the continuous heat flux boundary condition used in the HT3D method (see the FDS Tech Guide \cite{FDS_Math_Guide} for details).  Figure \ref{fig:ht3d_slab} shows the surface (wall) temperature, $T_{\rm w}$, plotted as a function of time (the hot slab is cooling).  Note that the exact solution for the surface temperature is taken from Eq.~(\ref{eq:semiinfslab}) with $x=0$ m.  That is, $T_{\rm w}(t) \equiv T(0,t)$.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/ht3d_slab}
\caption[The \textct{ht3d\_slab} test cases]{Test of continuous heat flux boundary condition for 3D heat transfer.}
\label{fig:ht3d_slab}
\end{figure}

\FloatBarrier

\subsection{3D Heat Diffusion in a Steel I-Beam (\texorpdfstring{\textct{ht3d\_ibeam}}{ht3d\_ibeam})}
\label{ht3d_ibeam}

The purpose of this test case is to compare FDS HT3D with a well-established commercial finite-element model (ANSYS) for a reasonably practical problem.  We consider a steel I-beam cross-section $0.4 \;\si{m}$ on each side.  The flanges are $6 \;\si{cm}$ thick and the web is $4 \;\si{cm}$ thick.  The grid resolution for both FEM and FDS models is $\Delta x = 1 \;\si{cm}$.  The thermal properties of the steel are taken to be constant: $k=45 \;\si{W/(m.K)}$, $\rho=7850 \;\si{kg/m^3}$, and $c = 0.60 \;\si{kJ/(kg.K)}$.  The boundary conditions are adiabatic except for a hot patch on the front half of the bottom flange maintained at $800 \;\si{\degreeCelsius}$.  The initial temperature of the steel is $20 \;\si{\degreeCelsius}$ and the case is run for 3600 s.  Note that the FEM model is run with a time step comparable to the explicit stability criterion ($\Delta t \approx 1.7 \;\si{s}$) in order to yield time accurate results for comparison with FDS.

Figure \ref{fig:ht3d_ibeam_contours} shows a comparison between the surface temperature contours from ANSYS (left) and FDS (right).  Below that, in Fig.~\ref{fig:ht3d_ibeam_time_history}, we show the time history of the surface temperatures for six locations on the bottom flange (positions may be identified from the image on the left).

\begin{figure}[ht]
\centering
\vskip\baselineskip
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.25in]{FIGURES/FE_Ts_contour} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/ht3d_ibeam_3600} \\
\end{tabular*}
\caption[The \textct{ibeam-ht3d} test case: contours]{Three-dimensional heat diffusion in an I-beam, comparison between a commercial finite-element code (ANSYS, left, courtesy Chao Zhang) and FDS (right).  The beam boundary conditions are adiabatic except for a hot patch maintained at \SI{800}{\degreeCelsius} on the front right of the bottom flange.  The initial temperature of the steel is \SI{20}{\degreeCelsius} and the calculations are run for \SI{3600}{s}.}
\label{fig:ht3d_ibeam_contours}
\end{figure}

\begin{figure}[ht]
\centering
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\hspace{.5in}\includegraphics[height=2.25in]{FIGURES/ht3d_ibeam_devc_loc} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/ht3d_ibeam_TS} \\
\end{tabular*}
\caption[The \textct{ibeam-ht3d} test case: time history]{(Left) Device locations corresponding to the legend entries in the plot to the right. (Right) Time history of the surface temperature.  Symbols represent the finite-element model (FEM) results and the lines represent the FDS results.}
\label{fig:ht3d_ibeam_time_history}
\end{figure}


\FloatBarrier

\subsection{3D Heat Diffusion Across Mesh Boundaries (\texorpdfstring{\textct{ht3d\_2mesh}}{ht3d\_2mesh})}
\label{sec:ht3d_2mesh}
\label{ht3d_2mesh_x}
\label{ht3d_2mesh_y}
\label{ht3d_2mesh_z}

This set of cases tests the ability of the 3D heat conduction solver to transfer heat across mesh boundaries.  The set of up is a 1 m long insulated square bar, 0.2 m $\times$ 0.2 m in cross section.  One end is held at \SI{200}{\degreeCelsius} and the other at \SI{20}{\degreeCelsius}.  The mesh boundary lies at the midpoint between the two ends (Position = 0 m).  The thermal diffusivity is unity.  The solution is run for 100 s from an initial condition of \SI{20}{\degreeCelsius} everywhere except the hot surface.  The steady state profile is linear between the two end temperatures.  Results for three different orientations of the bar are shown in Fig.~\ref{fig:ht3d_2mesh} below.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/ht3d_2mesh}
\caption[The \textct{ht3d\_2mesh} test cases]{Test of 3D heat transfer across mesh boundaries.}
\label{fig:ht3d_2mesh}
\end{figure}

\FloatBarrier

\subsection{3D Heat Diffusion in a Sphere (\texorpdfstring{\textct{ht3d\_sphere}}{ht3d\_sphere})}
\label{sec:ht3d_sphere}
\label{ht3d_sphere_102}
\label{ht3d_sphere_51}
\label{ht3d_sphere_25}

\textbf{Salah Benkorichi, Omega Fire Engineering Ltd.}\\

In this example, a solid sphere of radius 0.1 m with internal heat generated at $\dot{q}^{\prime\prime\prime}$ = 200 \si{kW/m^3} is studied. The initial temperature at the boundary is set to \SI{20}{\degreeCelsius}. The objective of the test is to ensure that the heat conduction through the sphere and across the radius is computed properly. The heat conduction can be written as
\begin{equation}
\label{eq:sphere}
\frac{\partial T}{\partial t} = \alpha \left[ \frac{1}{r^2} \frac{\partial}{\partial r^2} \left( r^2 \frac{\partial T}{\partial r} \right) + \frac{\dot{q}^{\prime\prime\prime}}{k} \right]
\end{equation}
where $k$ is the thermal conductivity and $\alpha$ is the thermal diffusivity.  The initial and boundary conditions are
\begin{equation}
\label{eq:sphere_int}
\left. T  \right|_{t=0} =T_0 \qquad; \qquad \left. T \right|_{r=a} = T_0 \qquad; \qquad \left. \frac{\partial T}{\partial r} \right|_{r=0}=0
\end{equation}
where $T_0$ is the initial temperature and $a$ is the radius of the sphere. The exact solution to Eqs.~(\ref{eq:sphere}) and (\ref{eq:sphere_int}) is from \cite{Carslaw:1} (Sec.~9.8, p.~243):
\begin{equation}
\label{eq:sphere_sol}
T = T_0 + \frac{\dot{q}^{\prime\prime\prime}}{6k} \left ( a^2 - r^2 \right ) + 2 \frac{\dot{q}^{\prime\prime\prime}a^3}{k\pi^3 r} \sum\limits_{n=1}^\infty \frac{(-1)^n}{n^3}\sin \left(\frac{n\pi r}{a}\right)\exp \left( -\alpha t \frac{n^2 \pi^2}{a^2} \right)
\end{equation}

The solution is run for 180 s. In Fig.~\ref{fig:ht3d_sphere_time} we show the temperature contours at $t=165$ s for the medium resolution case (left) and a comparison between the analytical and numerical solutions at several points in time for the high resolution case (right). Fig.~\ref{fig:ht3d_sphere_conv} shows the $L_\infty$ error as a function of cell size.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{../FDS_Verification_Guide/SCRIPT_FIGURES/ht3d_sphere_51_165}
\includegraphics[height=2.2in]{../FDS_Verification_Guide/SCRIPT_FIGURES/ht3d_sphere_profile}
\caption[The \textct{ht3d\_sphere} profiles]{(Left) Temperature contours at $t = 165$ s for $n=51$ cells across diameter. (Right) A comparison between radial profiles of the analytical and numerical solution at various times in the simulation.}
\label{fig:ht3d_sphere_time}
\end{figure}

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{../FDS_Verification_Guide/SCRIPT_FIGURES/ht3d_sphere_convergence1}
\caption[The \textct{ht3d\_sphere} convergence]{$L_{\infty}$ error in sphere temperature at $t=180$ s with different cell numbers [102, 51, 25] from left to right.}
\label{fig:ht3d_sphere_conv}
\end{figure}

\subsection{3D Internal Radiation (\texorpdfstring{\textct{ht3d\_radiation}}{ht3d\_radiation})}
\label{ht3d_radiation}

\textbf{Morgan Bruns, Virginia Military Institute}\\

This is a 1D problem set up in the 3D heat transfer solver.  The hot surface of a block of material is held at 700 \si{\degreeCelsius}.  The cold side is held at 20 \si{\degreeCelsius}.  The thermal conductivity is set to 0.1 \si{W/(m.K)}.  The refractive index $n$ is set to 1.5 and two values of absorption coefficient $\kappa = [100, 2000]$ 1/m are used.  If there where no internal radiation, the temperature solution would, of course, just be linear.  For a thermally thick material, the radiative conductivity $k_{\mathrm{r}} = 16 n^2 \sigma T^3 / 3 \kappa$ is added to the thermal conductivity.  Figure \ref{fig:ht3d_radiation} shows FDS results compared to the analytical solution from \cite{Modest:2003}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{../FDS_Verification_Guide/SCRIPT_FIGURES/ht3d_radiation}
\caption[The \textct{ht3d\_radiation} solution]{Steady-state temperature profiles inside a solid.  We consider two values of absorption coefficient, $\kappa = [100, 2000]$ 1/m and look at FDS solutions at three grid resolutions.}
\label{fig:ht3d_radiation}
\end{figure}



\chapter{Pyrolysis}

This chapter includes tests of the routines that calculate the thermal decomposition of materials. Solid surfaces can consist of multiple layers, and each layer can consist of multiple material components. Each material component may undergo several competing reactions, and each of these reactions may produce some other solid component (residue), gaseous fuel, and/or water vapor.

\section{Conservation of Pyrolyzed Mass (\texorpdfstring{\textct{surf\_mass\_conservation}}{surf\_mass\_conservation})}

The calculations described in this section check the conservation of mass produced by the pyrolysis algorithm. In the tests, four independent modeling options are varied:
\begin{enumerate}
\item The \textct{SURF} line can be associated with either a solid surface as designated by a \textct{VENT} line, or by solid particles as described by a \textct{PART} line.
\item The \textct{SURF} geometry can be either \textct{CARTESIAN}, \textct{CYLINDRICAL}, or \textct{SPHERICAL}.
\item The \textct{MATL} can be either charring (non-zero \textct{NU\_RESIDUE}) or non-charring.
\item The pyrolysis product can be either the fuel gas defined by the mixture fraction model, or an additional gas species, defined by a \textct{SPEC} line.
\end{enumerate}
In most cases, the wall thickness (or radius for cylindrical and spherical geometries) is 0.01~m. The material density is 360~\si{kg/m^3} and the yield of gaseous products for the charring cases is 0.5, i.e., half of the original mass. For Cartesian surfaces, the mass loss per unit area is 1.8~\si{kg/m^2} for charring, and 3.6~\si{kg/m^2} for non-charring materials. For cylindrical surfaces, the volume per unit surface area is $r/2$, and thus the mass loss per unit area is $360(1-0.5) \times r/2$=0.9~\si{kg/m^2} for charring, and 1.8~\si{kg/m^2} for non-charring materials. For spherical surfaces, the volume per unit surface area is $r/3$, and thus the mass loss per unit area is $360(1-0.5) \times r/3$=0.6~\si{kg/m^2} for charring, and 1.2~\si{kg/m^2} for non-charring materials.


\subsection{Pyrolysis at a Solid Surface}
\label{surf_mass_vent_char_cart_fuel}
\label{surf_mass_vent_char_cart_gas}
\label{surf_mass_vent_char_cyl_fuel}
\label{surf_mass_vent_char_cyl_gas}
\label{surf_mass_vent_char_spher_fuel}
\label{surf_mass_vent_char_spher_gas}
\label{surf_mass_vent_nonchar_cart_fuel}
\label{surf_mass_vent_nonchar_cart_gas}
\label{surf_mass_vent_nonchar_cyl_fuel}
\label{surf_mass_vent_nonchar_cyl_gas}
\label{surf_mass_vent_nonchar_spher_fuel}
\label{surf_mass_vent_nonchar_spher_gas}

The analytical mass losses are calculated by multiplying the mass per unit area by the \textct{VENT} area, which in all cases is 1~m$^2$. The expected and computed results for charring material are compared in Fig.~\ref{surf_mass_vent_char}. The expected and computed results for non-charring material are compared in Fig.~\ref{surf_mass_vent_nonchar}.

\begin{figure}[!htb]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_char_cart_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_char_cart_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_char_cyl_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_char_cyl_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_char_spher_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_char_spher_gas}
\end{tabular*}
\caption[The \textct{ surf\_mass\_vent\_char} test cases]{Comparison of analytical and predicted mass change for charring surfaces that are introduced as \textct{VENT}s.}
\label{surf_mass_vent_char}
\end{figure}

\begin{figure}[p]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_nonchar_cart_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_nonchar_cart_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_nonchar_cyl_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_nonchar_cyl_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_nonchar_spher_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_nonchar_spher_gas}
\end{tabular*}
\caption[The \textct{surf\_mass\_vent\_nonchar} test cases]{Comparison of analytical and predicted mass change for non-charring surfaces that are introduced as \textct{VENT}s.}
\label{surf_mass_vent_nonchar}
\end{figure}


\subsection{Pyrolysis of Discrete Particles}

\label{surf_mass_part_char_cart_fuel}
\label{surf_mass_part_char_cart_gas}
\label{surf_mass_part_char_cyl_fuel}
\label{surf_mass_part_char_cyl_gas}
\label{surf_mass_part_char_spher_fuel}
\label{surf_mass_part_char_spher_gas}
\label{surf_mass_part_nonchar_cart_fuel}
\label{surf_mass_part_nonchar_cart_gas}
\label{surf_mass_part_nonchar_cyl_fuel}
\label{surf_mass_part_nonchar_cyl_gas}
\label{surf_mass_part_nonchar_spher_fuel}
\label{surf_mass_part_nonchar_spher_gas}

For Lagrangian particles, the expected values of the mass are obtained by multiplying the material density by the particle volume by the residue fraction. For Cartesian surfaces (plates), the particle area is two times the product of the parameters \textct{LENGTH} and \textct{WIDTH} on the \textct{SURF} line, both of which are given a value of 0.05~m. As a result, the expected masses for plate particles are $360 (1-0.5) \times 2\delta L W=0.009$~kg for charring, and 0.018~kg for non-charring materials. Note that the half-thickness, $\delta=0.01$~m, is specified on the \textct{SURF} line as \textct{THICKNESS}. For cylindrical particles, the \textct{LENGTH} is 0.1~m, and the radius, $r$ (specified via \textct{THICKNESS}), is 0.01~m. The expected masses are thus $360(1-0.5) \times \pi r^2 L=0.00565$~kg for charring, and 0.0113~kg for non-charring materials. For spherical particles, the expected mass is $360(1-0.5) \times 4\pi r^3/3=7.54\times 10^{-4}$~kg for charring, and $1.51\times 10^{-3}$~kg for non-charring materials.

\subsubsection{Charring Particles}

The analytical and computed results for charring material are compared in Fig.~\ref{surf_mass_part_char}. The analytical and computed results for non-charring material are compared in Fig.~\ref{surf_mass_part_nonchar}.

\begin{figure}[!htb]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cart_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cart_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cyl_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cyl_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_spher_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_spher_gas}
\end{tabular*}
\caption[The \textct{surf\_mass\_part\_char} test cases]{Comparison of analytical and predicted mass change for charring particle surfaces.}
\label{surf_mass_part_char}
\end{figure}

\begin{figure}[p]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cart_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cart_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cyl_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cyl_gas} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_spher_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_spher_gas}
\end{tabular*}
\caption[The \textct{surf\_mass\_part\_nonchar} test cases]{Comparison of analytical and predicted mass change for non-charring particle surfaces.}
\label{surf_mass_part_nonchar}
\end{figure}



\subsubsection{Multiple Particles}
\label{surf_mass_part_char_cyl_gas_advanced}

This is a test case for mass conservation involving multiple particles. The case has three meshes, and each mesh has the same mass of charring cylindrical particles as the cases above. Because the length of the cylindrical particles is four times 0.1~m, the cylinder diameter is only half of the value used above.
\begin{description}
\item[Mesh 1] has four 0.1 m long cylinders with 5 mm radius. The locations are randomly chosen from a plane defined by the \textct{INIT} statement.
\item[Mesh 2] has eight 0.05 m long cylinders, initialized using the \textct{INIT} and \textct{MULT} statements.
\item[Mesh 3] has eight 0.05 m long cylinders, initialized using the \textct{INIT} and \textct{MULT} statements. The cylinders are split in two sections using the
\textct{NUMBER\_RADIATIVE\_ANGLES} feature of the \textct{PART} class.
\end{description}
The analytical and computed results are compared in Fig.~\ref{surf_mass_part_char_advanced}. The readability of the figure is improved by setting the external heat fluxes for Meshes 1, 2, and 3 to 50 \si{kW/m^2}, 45 \si{kW/m^2}, and 40 \si{kW/m^2}, respectively.
\begin{figure}[!htb]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cyl_gas_advanced}
\caption[The \textct{surf\_mass\_part\_char\_cyl\_gas\_advanced} test case]{Comparison of analytical and predicted mass change for a charring, cylindrical surface associated with particles in three variations.}
\label{surf_mass_part_char_advanced}
\end{figure}

\subsubsection{Split Particles}
\label{surf_mass_part_char_cart_fuel_split}
\label{surf_mass_part_nonchar_cart_fuel_split}
\label{surf_mass_part_char_cyl_fuel_split}
\label{surf_mass_part_nonchar_cyl_fuel_split}
\label{surf_mass_part_char_spher_fuel_split}
\label{surf_mass_part_nonchar_spher_fuel_split}
\label{surf_mass_part_char_cart_fuel_energy_split}
\label{surf_mass_part_nonchar_cart_fuel_energy_split}
\label{surf_mass_part_char_cyl_fuel_energy_split}
\label{surf_mass_part_nonchar_cyl_fuel_energy_split}
\label{surf_mass_part_char_spher_fuel_energy_split}
\label{surf_mass_part_nonchar_spher_fuel_energy_split}

``Split'' particles are Lagrangian particles that are allowed to have more than one orientation. For example, a sphere might be split in two halves, with its upper hemisphere pointing upwards and its lower hemisphere pointing downwards. In the test cases, particles in the shape of plates, cylinders and spheres are split in the $x$, $y$, and $z$ coordinate directions, respectively. The mass conservation results are shown in Fig.~\ref{surf_mass_part_fuel_split}, and the total energy conservation results are shown in Fig.~\ref{surf_mass_part_fuel_energy_split}.

\begin{figure}[!htb]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cart_fuel_split} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cart_fuel_split} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cyl_fuel_split} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cyl_fuel_split} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_spher_fuel_split} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_spher_fuel_split}
\end{tabular*}
\caption[The \textct{surf\_mass\_part\_fuel\_split} test cases, mass conservation]{Comparison of analytical and predicted mass change for split particle surfaces.}
\label{surf_mass_part_fuel_split}
\end{figure}

\begin{figure}[p]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cart_fuel_energy_split} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cart_fuel_energy_split} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_cyl_fuel_energy_split} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_cyl_fuel_energy_split} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_char_spher_fuel_energy_split} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_part_nonchar_spher_fuel_energy_split}
\end{tabular*}
\caption[The \textct{surf\_mass\_part\_fuel\_split} test cases, energy conservation]{Comparison of analytical and predicted total energy release for split particle surfaces.}
\label{surf_mass_part_fuel_energy_split}
\end{figure}


\subsubsection{Particles that Generate Multiple Gas Species}
\label{surf_mass_two_species_cart}
\label{surf_mass_two_species_cyl}
\label{surf_mass_two_species_spher}

Figure~\ref{surf_mass_two_species} shows the results of three test cases involving 0.1~kg of flat, cylindrical, or spherical particles in a unit cube that simultaneously generate fuel gas and water vapor, like wood or vegetation.

\begin{figure}[!htb]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_two_species_cart} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_two_species_cyl} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_two_species_spher}
\caption[The \textct{surf\_mass\_two\_species} test cases]{Comparison of analytical and predicted mass change for particles that generate water and fuel gas.}
\label{surf_mass_two_species}
\end{figure}





\section{Burning Rate of a Small Object (\texorpdfstring{\textct{cell\_burn\_away}}{cell\_burn\_away})}
\label{cell_burn_away}

In FDS, it is assumed that heat conduction and pyrolysis within solids are functions of depth only. This can be problematic in cases where entire solid obstructions burn away. In this example, a single grid cell, 4~cm on a side, is made up of a material with density $\rho_{\rm s}=50$~\si{kg/m^3} and constant reaction rate, $r_{\rm s}=0.05$~s$^{-1}$. The burning rate of the single grid cell, $\dm$, is given by:
\be
   \dm = \delta \, \rho_{\rm s} \, r_{\rm s} \, A  \label{br}
\ee
where $\delta$ is the thickness of the surface layer and $A$ is the area of the six faces of the single grid cell. If we set the layer thickness so that $\delta \, A=V$, where $V$ is the volume of the cell, and note that the mass of the cell is $m=\delta \, A \, \rho_{\rm s}$, Eq.~(\ref{br}) becomes:
\be
   \dm = m \, r_{\rm s} = m_0 \, r_{\rm s} \, {\rm e}^{-r_{\rm s} t}
\ee
Figure~\ref{cell_burn_away_fig} displays the computed and analytical burning rate. Note that the burning rate is proportional to the mass and the mass decays exponentially to zero in this case because we have specified the {\ct THICKNESS} to be $V/A$ and set the {\ct BULK\_DENSITY} to be 50~\si{kg/m^3} on the {\ct OBST} line defining the single solid grid cell.
\begin{figure}[!htb]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/cell_burn_away}
\caption[The {\ct cell\_burn\_away} test case.]{Burning rate of a single grid cell with fixed reaction rate.}
\label{cell_burn_away_fig}
\end{figure}




\section{Evaporation of a Liquid Surface (\texorpdfstring{\textct{surf\_mass\_vent\_liquid}}{surf\_mass\_vent\_liquid})}
\label{surf_mass_vent_liquid_fuel}
\label{surf_mass_vent_liquid_fuel_nonconforming}

To test the liquid fuel evaporation model, a 1~cm deep pool of heptane is exposed to a 50~kW/m$^2$ heat flux and the evolution of fuel vapor and surface density are tracked. Results are shown in Fig.~\ref{surf_mass_vent_liquid}. Note that in the ``nonconforming'' case, the specified pool dimensions do not align with the specified mesh, but the same amount of fuel vapor is expected.

\begin{figure}[!htb]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_liquid_fuel} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/surf_mass_vent_liquid_fuel_nonconforming}
\end{tabular*}
\caption[The \textct{surf\_mass\_vent\_liquid\_fuel} test cases]{Comparison of analytical and predicted mass change for a liquid surface.}
\label{surf_mass_vent_liquid}
\end{figure}


\section{Change in Surface Emissivity (\texorpdfstring{\textct{emissivity}}{emissivity})}

For thermally thick materials, the surface emissivity is computed as a mass-weighted sum of the individual values of the emissivity in the first condensed phase grid cell. In this verification test, the initial material, having emissivity of 1.0, is converted to another material, having emissivity of 0.0, at a constant rate of 0.1~s$^{-1}$. As a result, the surface emissivity should change linearly from 1.0 to 0.0 in 10~s (Fig.~\ref{emissivity}).

\begin{figure}[!htb]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/emissivity}
\caption[The \textct{emissivity} test case]{Testing the emissivity of solid materials.}
\label{emissivity}
\end{figure}




\section{Shrinking and swelling materials (\texorpdfstring{\textct{shrink\_swell}}{shrink\_swell})}
\label{shrink_swell}

A single layer of a multi-component material contains reacting material (1) and an inert matrix (2). If the product material (3) of the reaction is of higher density than the reactant ($\rho_3 > \rho_1$), the layer thickness $\Delta$ should shrink. If the product density is lower than the reactant's density ($\rho_3 < \rho_1$) the layer should swell (increase) in thickness. If the inert material has a static matrix structure (\textct{ALLOW\_SHRINKING=.FALSE.} or \textct{ALLOW\_SWELLING=.FALSE.}) the layer thickness should not change. The parameters of the six test cases are shown in the following table. Figure~\ref{shrink_swell2} shows the surface densities, which obviously should not change, and the surface thicknesses over the time of the simulation.

\begin{table}[!htb]
\centering
\caption[Parameters for shrinking and swelling of materials]{Parameters used to test the shrinking and swelling of materials.}
\label{shrink_swell_table}
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|}
\hline
Case     & \multicolumn{2}{|c|}{Reactant}  &  \multicolumn{3}{|c|}{Inert} & Product & \multicolumn{4}{|c|}{Layer} \\ \hline
         & $\rho_1$  & $Y_1$ & $\rho_2$  & $Y_2$ & Allow        & $\rho_3$  & $\rho_{\rm s}$(0) & $\rho_{\rm s}$(end) & $\Delta$(0) & $\Delta$(end) \\
         & (\si{kg/m^3})&       & (\si{kg/m^3})&       & shrink/swell & (\si{kg/m^3})& (\si{kg/m^3})  & (\si{kg/m^3})    & (m)         & (m) \\ \hline

Shrink 1 & 500 & 1   & 0   & 0   & T   & 1000   & 500 & 1000   & 0.001  & 0.0005 \\
Shrink 2 & 500 &0.9  &500  &0.1  &T &1125 &500  &1000 &0.001   &0.0005 \\
Shrink 3 & 500 &0.9  &500  &0.1  &F &1125 &500  &500  &0.001   &0.001 \\
Swell 1          & 1000 &1 &90   &0 &T &500  &1000 &500  &0.001   &0.002 \\
Swell 2          & 1000 &0.9  &1000 &0.1  &T &450  &1000 &500  &0.001   &0.002 \\
Swell 3          & 1000 &0.9  &1000 &0.1  &F &450  &1000 &1000 &0.001   &0.001 \\ \hline
\end{tabular}
\end{table}

\begin{figure}[!htb]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/shrink_mass_conservation} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/swell_mass_conservation} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/shrink_thickness} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/swell_thickness} \\
\end{tabular*}
\caption[The \textct{shrink\_swell} test case]{Testing the shrinking and swelling surfaces.}
\label{shrink_swell2}
\end{figure}



\section{Enthalpy of Solid Materials (\texorpdfstring{\textct{enthalpy}}{enthalpy})}
\label{enthalpy}

Consider a thin plate of conductive material that is exposed on one side to an elevated temperature heat source and exposed on the other to an ambient temperature void. In the thermally thin limit, the temperature of the slab is governed by the following equation
\be
   \frac{\d T_{\rm s}}{\d t} = \frac{\dq_{\hbox{\tiny front}}'' + \dq_{\hbox{\tiny back}}''}{c_{\rm s} \, \rho_{\rm s} \, \delta}
\ee
In this example, the initial exposure to the front side of the slab is 3~kW/m$^2$. The original material A undergoes a reaction to form material B.  The reaction rate is constant, 0.2~s$^{-1}$, which in this case means that material A disappears in exactly 5~s. This is achieved by setting $n_{\rm s}$ and $E$ to 0 and $A$ to 0.2 in the reaction rate term:
\be
    r = \left( \frac{\rho_{s,A}}{\rho_{s0}}\right)^{n_{s}}
    A \; \exp \left(-\frac{E}{RT_{\rm s}}\right)
\ee
The density and conductivity of both materials are 30~\si{kg/m^3} and 10~\si{W/(m.K)}, respectively. The emissivity of the front and back is 1.  The specific heat of material A changes from 1.0~\si{kJ/(kg.K)} to 0.1~\si{kJ/(kg.K)} above 80~\si{\degree C}, while the specific heat of material B is constant at 1.0~\si{kJ/(kg.K)}. The slab is 1~mm thick.
\begin{figure}[!htb]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/enthalpy}
\caption[The \textct{enthalpy} test case]{Testing the enthalpy of solid materials.}
\label{fig:solid_phase_enthalpy}
\end{figure}
Note that the ``analytical'' solution is actually a simple numerical integration of the equations above with a small time step to ensure accuracy.
This example (Fig.~\ref{fig:solid_phase_enthalpy}) tests a number of features, including the reaction rate, mass weighted specific heats, and radiation boundary conditions. Note that the
convective heat transfer has been turned off, and the correct steady-state temperature is calculated by FDS.




\section{Simple Phase Change Reaction (\texorpdfstring{\textct{pcm\_slab}}{pcm\_slab})}

A semi-infinite layer of liquid in the semi-infinite region, $x>0$,
is cooled by setting the surface, $x=0$, to a constant temperature, $T_0$,
below the freezing temperature, $T_f$. Initially, the liquid is at temperature $T_i > T_f$. The position of the boundary between frozen and liquid layers
is denoted by $x_f$. The heat conduction equations for the two regions are
\begin{eqnarray}
\dod{T_{\rm s}}{t} & = & \alpha_{\rm s} \dsods{T_{\rm s}}{x} \quad \quad (0 < x < x_f) \\ [0.2in]
\dod{T_{\rm s}}{t} & = & \alpha_l \dsods{T_{\rm s}}{x} \quad \quad (x > x_f)
\end{eqnarray}
with boundary conditions
\begin{eqnarray}
T_{\rm s}(x,0)   &= & T_i \nonumber \\
T_{\rm s}(0,t)   &= & T_0 \nonumber \\
T_{\rm s}(x_f,t) &= & T_f \nonumber
\end{eqnarray}
The analytical solutions for the phase interface location and temperature are \cite{Carslaw:1}
\be
x_f(t) = 2 \lambda \sqrt{\alpha_l t}
\ee
\begin{eqnarray}
\frac{T_{\rm s}(x,t)-T_0}{T_f - T_0} &=& \frac{\erf(x/2\sqrt{\alpha t})} {\erf (x_f/2\sqrt{\alpha t})} \quad \quad (0 < x < x_f) \\ [0.2in]
\frac{T_i-T_{\rm s}(x,t)}{T_i - T_f} &=& \frac{\erfc(x/2\sqrt{\alpha t})}{\erfc(x_f/2\sqrt{\alpha t})} \quad \quad (x > x_f)
\end{eqnarray}
where $\lambda = x_f /2\sqrt{\alpha t}$ is obtained as a root of the (complicated)
transcendental equation, given in \cite{Carslaw:1}.

In the test case, the thickness of the liquid layer cannot be infinite. For practical purposes, a 50 cm thick layer was found to be sufficient.
The fixed-temperature boundary condition, which is formally not available for the condensed-phase heat transfer solver in FDS,
is implemented by assuming that the gas temperature is $T_0$ with a very high heat convection coefficient.
For material properties, we choose $\rho_{\rm s} = \rho_l =1,000$~\si{kg/m^3},
$k_{\rm s} = k_l = 2$~\si{W/(m.K)}, $c_{\rm s} = c_l = 2$~\si{kJ/(kg.K)}, $H_{r,\alpha\beta}=300$~kJ/kg, $T_f = 0$~\si{\degree C}, $T_i = +15$~\si{\degree C},
and $T_0 = -15$~\si{\degree C}, which leads to a {\em Stefan number}
\be
\hbox{St}=\frac{c_{\rm s}\left(T_i - T_0\right)}{H_{r,\alpha\beta}} = 0.1
\ee
and $\lambda = 0.189$.

Analytical and simulated results are compared in Fig.~\ref{pcm_slab}. The plot on the left shows the position of the phase boundary.
From the FDS results, two estimates of $x_f$ are determined because in the numerical solution, the boundary of the two phases is not perfectly sharp.
``FDS min'' is the largest value of $x$ for which $\rho_{\rm s} > 990$~\si{kg/m^3} and ``FDS max'' is the largest $x$ for which $\rho_{\rm s} > 0$~\si{kg/m^3}. The plot on the right
shows temperatures at three depths from the surface: 1~cm, 5~cm, and 10~cm.
\begin{figure}[!htb]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/pcm_slab_xf} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/pcm_slab_T}
\end{tabular*}
\caption[The \textct{pcm\_slab} test cases]{Comparison of analytical and simulated results for the two-region Neumann problem with phase change.}
\label{pcm_slab}
\end{figure}




\section{A Simple Two-Step Pyrolysis Example (\texorpdfstring{\textct{two\_step\_solid\_reaction}}{two\_step\_solid\_reaction})}
\label{two_step_solid_reaction}

Before considering actual experimental measurements, it is necessary to check the accuracy of the ordinary differential
equation solver within FDS. Consider a simplified set  of ordinary  differential equations  describing the mass
fraction of three components of a solid material  undergoing thermal degradation:
\begin{eqnarray}
    \frac{\d Y_a}{\d t} &=&  -K_{ab} Y_a \nonumber  \\
    \frac{\d Y_b}{\d t} &=&   K_{ab} Y_a  -  K_{bc}  Y_b  \\
    \frac{\d Y_c}{\d t} &=&   K_{bc} Y_a
    \nonumber
\end{eqnarray}
where  the  mass  fraction  of  component  $a$  is  1  initially.  The
analytical solution is:
\begin{eqnarray}
    Y_a(t)    &=&    \exp(-K_{ab}t)    \nonumber   \\
    Y_b(t)    &=&    \frac{K_{ab}}{K_{bc}-K_{ab}} \exp(-K_{ab} t)  - \exp(-K_{bc} t) \\
    Y_c(t)    &=&    \left[   K_{ab}    (1-\exp(-K_{bc} t) )    +  K_{bc}*(\exp(-K_{ab} t) -1) \right] / (K_{ab}-K_{bc})
\end{eqnarray}
The analytical and  numerical solution for the parameters $K_{ab} = 0.389$ and $K_{bc} = 0.262$ are shown in Fig.~\ref{fig:two_step_solid_reaction}:

\begin{figure}[!htb]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/two_step_solid_reaction}
\caption[The \textct{two\_step\_solid\_reaction} test case]{Comparison of a two-step solid pyrolysis calculation with an analytical solution.}
\label{fig:two_step_solid_reaction}
\end{figure}




\section{Interpreting Bench-Scale Measurements}
\label{solid_kinetics}

This section describes a method of deriving and applying the values of the kinetic parameters for the thermal decomposition of a solid, following the methodology described by Lyon~\cite{Lyon:FM2000}. This is the basic theory that underlies measurement methods like Thermo-Gravimetric Analysis (TGA) and Micro-Combustion Calorimetry (MCC).


\subsection{General Theory}

Consider a small sample of solid material that is heated at a relatively slow, constant rate. Assume that the solid consists of $N$ material components, with each component mass fraction denoted by $Y_\alpha(t)$. As the solid is heated, each component undergoes a reaction to form undetermined gases or a single solid residue whose mass fraction is denoted $Y_{\rm r}(t)$ and whose yield is denoted by $\nu_{\rm r}$. The governing equations for the component mass fractions are:
\begin{eqnarray}
   \frac{\d Y_\alpha}{\d t} &=& -A_\alpha \, Y_\alpha \, \exp \left( -\frac{E_\alpha}{RT} \right)    \quad ; \quad Y_\alpha(0) = Y_{\alpha,0} \quad ; \quad \alpha=1,N  \label{dYdt} \\
   \frac{\d Y_{\rm r}}{\d t} &=& -\nu_{\rm r}  \sum_\alpha \frac{\d Y_\alpha}{\d t}                                   \quad ; \quad Y_{\rm r}(0) = 0  \label{dYrdt}
\end{eqnarray}
In standard test apparatus, the temperature of the sample is increased linearly in time, $dT/dt=\beta$. Because the test results are usually expressed as a function of temperature rather than time, it is convenient to rewrite Eq.~(\ref{dYdt}) as:
\be
   \frac{\d Y_\alpha}{\d T} = -\frac{A_\alpha}{\beta} \, Y_\alpha \, \exp \left( -\frac{E_\alpha}{RT} \right)    \quad ; \quad Y(T=T_0) = Y_{\alpha,0}  \label{dYdT}
\ee
The decomposition rate for each material component, $-dY_\alpha/dt$, peaks at a temperature denoted by $T_{\alpha,{\rm p}}$ with a value denoted by $r_{\alpha,{\rm p}}$. At this temperature, the second derivative of $Y_\alpha$ is zero:
\begin{eqnarray}
   \frac{\d^2 Y_\alpha}{\d T^2} &=& -\frac{A_\alpha}{\beta} \, \frac{\d Y_\alpha}{\d T} \, \exp \left( -\frac{E_\alpha}{R T_{\alpha,{\rm p}} } \right) -
   \frac{A_\alpha}{\beta} \, Y_\alpha \, \exp \left( -\frac{E_\alpha}{R T_{\alpha,{\rm p}} } \right) \, \frac{E_\alpha}{R T_{\alpha,{\rm p}}^2} \nonumber \\[.1in]
   &=& -\frac{\d Y_\alpha}{\d T} \left[ \frac{A_\alpha}{\beta} \, \exp \left( -\frac{E_\alpha}{R T_{\alpha,{\rm p}} } \right) - \frac{E_\alpha}{R T_{\alpha,{\rm p}}^2} \right] = 0  \label{d2YdT2}
\end{eqnarray}
Equation~(\ref{dYdT}) can be integrated from $Y_{\alpha,0}$ to $Y_{\alpha,{\rm p}}$ (the value of $Y_\alpha$ at the peak), and $T_0$ to $T_{\alpha,{\rm p}}$:
\be
   \int_{Y_{\alpha,0}}^{Y_{\alpha,{\rm p}}} \left( \frac{\d Y_\alpha'}{Y_\alpha'} \right) = - \frac{A_\alpha}{\beta} \int_{T_0}^{T_{\alpha,{\rm p}}} \exp \left( -\frac{E_\alpha}{RT'} \right) \; dT'
   \approx - \frac{A_\alpha R T_{\alpha,{\rm p}}^2}{ \beta \, (E_\alpha+2 R T_{\alpha,{\rm p}}) } \; \exp \left( -\frac{E_\alpha}{RT_{\alpha,{\rm p}}} \right)
\ee
Using Eq.~(\ref{d2YdT2}) to eliminate $A_\alpha$ yields:
\be
   \ln \left( \frac{Y_{\alpha,{\rm p}}}{Y_{\alpha,0}} \right) = - \frac{E_\alpha}{E_\alpha+2 R T_{\alpha,{\rm p}}} \approx -1  \quad \quad (E_\alpha \gg 2 R T_{\alpha,{\rm p}})
\ee
or more simply, $Y_{\alpha,{\rm p}} \approx Y_{\alpha,0}/{\rm e}$. Now, the activation energy can be evaluated using Eqs.~(\ref{dYdt}) and (\ref{d2YdT2}):
\be
   E_\alpha = RT_{\alpha,{\rm p}}^2 \, \frac{A_\alpha}{\beta} \, \exp \left( -\frac{E_\alpha}{RT_{\alpha,{\rm p}}} \right) = \frac{RT_{\alpha,{\rm p}}^2}{\beta} \frac{r_{\alpha,{\rm p}}}{Y_{\alpha,{\rm p}}}
   \approx \frac{RT_{\alpha,{\rm p}}^2}{\beta} \frac{{\rm e} \, r_{\alpha,{\rm p}}}{Y_{\alpha,0}}  \label{E_formula}
\ee
Then $A_\alpha$ can be evaluated directly from Eq.~(\ref{dYdt}):
\be
   A_\alpha = \frac{r_{\alpha,{\rm p}}}{Y_{\alpha,{\rm p}}} \, \exp \left( \frac{E_\alpha}{RT_{\alpha,{\rm p}}} \right) \approx \frac{{\rm e} \, r_{\alpha,{\rm p}}}{Y_{\alpha,0}} \, \exp \left( \frac{E_\alpha}{RT_{\alpha,{\rm p}}} \right) \label{A_formula}
\ee
Note that the formulae for $A_\alpha$ and $E_\alpha$ can be evaluated with parameters that are obtained directly by inspection of the plot of mass loss rate versus temperature. For each peak, the values of $T_{\alpha,{\rm p}}$ are easy to obtain by inspection. The initial mass fractions, $Y_{\alpha,0}$, can be estimated based on the relative area underneath each peak. The values of $Y_{\alpha,0}$ should sum to 1.

The reaction rates, $r_{\alpha,{\rm p}}$, require a slight interpretation. Typically, tests like TGA produce plots of the normalized sample mass, $m/m_0$, and its first derivative with time, $-\d (m/m_0) /\d t$. However, the reaction rate in the analysis above is interpreted as the change in the component mass fraction with time:
\be
   r_\alpha = - \frac{\d Y_\alpha}{\d t}
\ee
The relationship between these two rates is
\be
   \sum_\alpha \frac{\d Y_\alpha}{\d t} = \frac{1}{1-\nu_{\rm r}} \frac{\d (m/m_0)}{\d t}
\ee
Thus, the reaction rates we need for Eqs.~(\ref{E_formula}) and (\ref{A_formula}), $r_{\alpha,{\rm p}}$, are related to the normalized mass loss rate curve as follows:
\be
   r_{\alpha,{\rm p}} = - \frac{1}{1-\nu_{\rm r}} \left. \frac{\d (m/m_0)}{\d t} \right|_{T=T_{\alpha,{\rm p}}}
   \label{rr_calc}
\ee
The examples in the following section describe how to interpret output from bench-scale material tests.

\subsection{Interpreting TGA Data (\texorpdfstring{\textct{tga\_sample}}{tga\_sample})}
\label{tga_sample}

The solid curve of the left hand plot of Fig.~\ref{tga_sample_plot} shows the measured normalized mass of a small solid sample undergoing heating at a rate of 5~$^\circ$C/min in the TGA apparatus. The solid curve of the right hand plot is the mass loss rate, or minus the first derivative of the plot on the left. The goal of this example is to obtain the kinetic parameters, $E_\alpha$ and $A_\alpha$, from Eqs.~(\ref{E_formula}) and (\ref{A_formula}) to solve numerically the ODE, Eqs.~(\ref{dYdt}) and (\ref{dYrdt}).
\begin{figure}[!htb]
\includegraphics[height=2.2in]{SCRIPT_FIGURES/tga_sample_mass}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/tga_sample_mlr}
\caption[Results of a TGA analysis]{Results of a TGA analysis. At left is the normalized sample mass as a function of the temperature. At right is the corresponding mass loss rate.}
\label{tga_sample_plot}
\end{figure}
The first decision to make is the number of reactions. Usually, this corresponds to the number of peaks in the mass loss rate curve, but for realistic cases, some judgment is needed. In this example, it is assumed that there are two material components, each of which is undergoing a single reaction in the neighborhood of a certain temperature. By inspection, $T_{1,{\rm p}}=300 \; ^\circ$C and $T_{2,{\rm p}}=500 \; ^\circ$C. The next piece of information from the measurement is the residue fraction, which is obtained from the plot on the left, $\nu_{\rm r}=0.53$. From Eq.~(\ref{rr_calc}), the reaction rates are obtained by converting the peak mass loss rates from the plot on the right: $r_{1,{\rm p}}=0.00045/0.47$~s$^{-1}$ and $r_{2,{\rm p}}=0.0001/0.47$~s$^{-1}$.  Finally, the initial mass fractions of the two components are estimated from the relative areas under the peaks in the right hand plot. In this case, $Y_{1,0}=0.6$ and $Y_{2,0}=0.4$.

In the FDS input file, {\ct tga\_sample.fds}, this information is conveyed via the following lines:
\begin{lstlisting}
&SURF ID             = 'SAMPLE'
      ...
      MATL_ID(1,1:2) = 'component 1','component 2'
      MATL_MASS_FRACTION(1,1:2) = 0.6,0.4 /

&MATL ID                    = 'component 1'
      ...
      N_REACTIONS           = 1
      REFERENCE_TEMPERATURE = 300.
      REFERENCE_RATE        = 0.0016
      HEATING_RATE          = 5.
      NU_SPEC               = 0.47
      SPEC_ID               = 'OFF-GAS'
      NU_MATL               = 0.53
      MATL_ID               = 'residue' /

&MATL ID                    = 'component 2'
      ...
      N_REACTIONS           = 1
      REFERENCE_TEMPERATURE = 500.
      REFERENCE_RATE        = 0.0005
      HEATING_RATE          = 5.
      NU_SPEC               = 0.47
      SPEC_ID               = 'OFF-GAS'
      NU_MATL               = 0.53
      MATL_ID               = 'residue' /
\end{lstlisting}
Note that {\ct REFERENCE\_RATE}, the FDS input parameter, represents the quantity, $r_{\alpha,{\rm p}}/Y_{\alpha,0}$. Note also that both material components have the same residue yield, {\ct NU\_MATL}. Solely from TGA data, it is not possible to determine how many unique material components there are, or what the reaction sequence is. The point of this exercise is simply to get FDS to mimic the total mass loss rate curve.


\subsection{Effect of the TGA Heating Rate (\texorpdfstring{\textct{birch\_tga}}{birch\_tga})}
\label{birch_tga}

This is an example of a comparison of a candidate solid phase model with TGA data that shows the effect of the sample heating rate. The sample cases called \textct{birch\_tga\_1step\_2} and \textct{birch\_tga\_1step\_20} simulate two standard TGA experiments in which small samples of birch wood are heated up slowly at constant rates of 2~\si{\degree C}/min and 20~\si{\degree C}/min, respectively. The model of the wood consists of only one reaction that converts virgin wood to char and fuel gases. There is also a reaction in the simulation that does nothing more than evaporate the small amount of moisture in the wood. This evaporation is evident in Fig.~\ref{fig_birch_tga} near the temperature of 100~\si{\degree C}.
\begin{figure}[!htb]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/birch_tga}
\caption[An example of TGA data]{\label{fig_birch_tga} Comparison of a solid phase model of birch wood with TGA data.}
\end{figure}



\subsection{Interpreting MCC Data (\texorpdfstring{\textct{cable\_XX\_mcc}}{cable\_XX\_mcc})}
\label{cable_11_mcc}
\label{cable_23_insulation}
\label{cable_701_insulation}
\label{cable_11_insulation}
\label{cable_11_jacket}
\label{cable_23_jacket}
\label{cable_701_jacket}

This section describes a method for interpreting micro-combustion calorimeter (MCC) measurements. The pyrolysis combustion flow calorimeter (PCFC), developed by Lyon and Walters~\cite{Lyon:JAAP2004} at the U.S. Federal Aviation Administration (FAA), is a device used to measure the heat generated from the combustion of small (4~mg to 6~mg) material samples by oxygen depletion calorimetry. Samples are pyrolyzed at a specified heating rate in an anaerobic atmosphere (typically N$_2$) and the resulting gases are mixed with excess oxygen and combusted in a separate chamber. The heat release rate from the specimen is obtained from measurements of the concentration of oxygen in the effluent exiting the combustor as a function of time. The methodology is the basis for the standard test ASTM~D~7309~\cite{microcc}.

The results of PCFC measurements for the jacket and insulation materials of several electrical cables are shown in Fig.~\ref{mcc_plots}. These samples were pyrolyzed in the PCFC at a rate of 1~\si{\degree C}/s from 100~\si{\degree C} to 600~\si{\degree C} in a nitrogen atmosphere and the effluent combusted at 900~\si{\degree C} in a mixture consisting of 20~\% O$_2$ and 80~\% N$_2$. The resulting curve shows the heat release rate of the sample as it was heated, normalized by the mass of the original sample. There are usually one, two or three noticeable peaks in the curve, corresponding to temperatures where a significant decomposition reaction occurs. Each peak can be characterized by the maximum value of the heat release rate per unit mass, $\dot{q}_{\alpha,{\rm p}}$, the temperature, $T_{\alpha,{\rm p}}$, and the relative fraction of the original sample mass that undergoes this particular reaction ($Y_{\alpha,0}$). The area under the curve
\be
   \int_0^\infty \dot{q}(T) \, dT = \beta \, \Delta h'
\ee
is the sample heating rate, $\beta$, multiplied by the energy released per unit mass of the original sample, $\Delta h'$. This latter quantity is related to the more conventional\footnote{In fire protection engineering, it is typically assumed that the heat of combustion is the energy released per unit mass of vaporized fuel.} heat of combustion via the relation
\be
   \Delta h = \frac{\Delta h'}{1-\nu_{\rm r}}
\ee
where $\nu_{\rm r}$ is the fraction of the original mass that remains as residue. Sometimes this is referred to as the ``char yield.'' Note that it is assumed to be the same for all reactions.

\begin{figure}[p]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.15in]{SCRIPT_FIGURES/cable_11_insulation_mcc} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/cable_11_jacket_mcc} \\
\includegraphics[height=2.15in]{SCRIPT_FIGURES/cable_23_insulation_mcc} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/cable_23_jacket_mcc} \\
\includegraphics[height=2.15in]{SCRIPT_FIGURES/cable_701_insulation_mcc} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/cable_701_jacket_mcc}
\end{tabular*}
\caption[Results of a micro-calorimetry analysis of cable materials]{Results of a micro-calorimetry analyses of cable insulation (left) and jacket materials (right).}
\label{mcc_plots}
\end{figure}

The MCC measurement is similar to TGA in that it is possible to derive the kinetic parameters, $A_\alpha$ and $E_\alpha$, for the various reactions from the heat release rate curve. As an example of how to work with MCC data, consider the two plots shown in Fig.~\ref{mcc_plots}. The solid curves in the figures display the results of micro-calorimetry measurements for the insulation and jacket material of multi-conductor control cables (the numbers have no particular meaning other than to distinguish them from other cables being studied).

Taking Cable~11 as an example, the insulation material exhibits two fairly well-defined peaks, whereas the jacket material exhibits three. Thus, the insulation material is modeled using two solid components, each undergoing a single-step reaction that produces fuel gas and a solid residue. The jacket material is modeled using three solid components. The residue yield for the insulation material is 6~\%; for the jacket 49~\%, obtained simply by weighing the sample before and after the measurement. It is not known which reaction produces what fraction of the residue. Rather, it is assumed that each reaction yields the same residue in the same relative amount. The dashed curves in Fig.~\ref{mcc_plots} are the results of FDS simulations of the MCC measurements. To mimic the sample heating, a very thin sheet comprised of a mixture of the solid components with an insulated backing is heated at the rate specified in the experiment (1~\si{\degree C}/s or 60~\si{\degree C}/min, the units needed in FDS). For each reaction, the kinetic parameters are calculated using the formulae (\ref{E_formula}) and (\ref{A_formula}). The values of $T_{\alpha,{\rm p}}$ are obtained directly from the figures. The peak reaction rate for reaction $\alpha$, $r_{\alpha,{\rm p}}$, is obtained from:
\be
   r_{\alpha,{\rm p}} = \frac{\dot{q}_{\alpha,{\rm p}}}{ \Delta h'}   \quad ; \quad
   \Delta h'= \frac{1}{\beta} \, \int_0^\infty \dot{q}(T) \, \d T   \label{r_formula}
\ee
where $\dot{q}_{\alpha,{\rm p}}$ is the peak heat release rate corresponding to reaction $\alpha$. The values, $Y_{\alpha,0}$, can be estimated from the relative area under the curve. Their sum ought to be 1. It is important to check the units of all of these quantities because the results of these experiments are often presented in different ways depending on the particular application. A mistake in units can result in values of $A_\alpha$ and/or $E_\alpha$ that will invariably cause spurious results. For this reason, the direct calculation of the kinetic parameters is avoided by inputting the reaction parameters instead.

The dashed curves in Fig.~\ref{mcc_plots} are the results of numerically integrating Eq.~(\ref{dYdt}) within FDS for each material component. A typical input line for FDS that describes a single material component undergoing a single reaction is given by:
\begin{lstlisting}
&MATL ID                    = 'Cable 11 Jacket Component A'
      ...
      N_REACTIONS           = 1
      REFERENCE_TEMPERATURE = 300.
      REFERENCE_RATE        = 0.0064
      HEATING_RATE          = 60.
      NU_MATL               = 0.49
      MATL_ID               = 'char'
      NU_SPEC               = 0.51 /
\end{lstlisting}
Only the relevant parameters are shown. The other parameters are not relevant in this exercise. Note that \textct{REFERENCE\_TEMPERATURE} is $T_{\alpha,{\rm p}}$ in units of \si{\degreeCelsius}. \textct{REFERENCE\_RATE} is actually $r_{\alpha,{\rm p}}/Y_{\alpha,0}$, in units of s$^{-1}$. \textct{HEATING\_RATE} is $\beta$ in units of \si{\degree C}/min. \textct{NU\_MATL} is $\nu_{\rm r}$ and \textct{NU\_SPEC} is ($1-\nu_{\rm r}$). Table~\ref{cable_parameters} lists all of the kinetic parameters for the cable insulation and jacket materials. The peak temperatures are easy to estimate, and the values of $r_{p,i}/Y_{0,i}$ can be fine-tuned to closely match the data. Note that it is possible to compute values of $A_i$ and $E_i$ and input them directly into FDS, rather than inputting those listed in the table. However, the values of $A_i$ and $E_i$ are fairly large numbers and have little meaning in their own.

\begin{table}[!htb]
\centering
\caption[Parameters for kinetic constants for cable materials]{Parameters used to derive the kinetic constants for Cable 11 materials. The heating rate for both is 60~\si{\degree C}/min.}
\label{cable_parameters}
\begin{tabular}{|l||c|c||c|c|c|}
\hline
Parameter                                       & \multicolumn{2}{|c||}{Insulation, $\nu_{\rm r}=0.06$ } &  \multicolumn{3}{|c|}{Jacket, $\nu_{\rm r}=0.49$}     \\ \cline{2-6}
                                                & $\alpha=1$    & $\alpha=2$                             &  $\alpha=1$  & $\alpha=2$   & $\alpha=3$              \\ \hline \hline
$T_{\alpha,{\rm p}}$ (\si{\degree C})           & 355           & 485                                    &  300         & 345          & 450                     \\ \hline
$r_{\alpha,{\rm p}}/Y_{\alpha,0}$ (s$^{-1}$)    & 0.0384        & 0.2426                                 &  0.0064      & 0.3500       & 0.0156                  \\ \hline
\end{tabular}
\end{table}


\section{Three-Dimensional Pyrolysis (PYRO3D) (Beta)}
\label{sec:pyro3d}


\subsection{Char Formation (\texorpdfstring{\textct{pyro3d\_wood\_char}}{pyro3d\_wood\_char})}
\label{pyro3d_wood_char}

This case is a simple mass conservation test for pyrolysis of wood into char and gas.  A small block of wood, 0.08 m on a side, is heated externally at 50 \si{kW/m^2} on all sides.  Gas phase combustion is suppressed.  The pyrolysis stoichiometry splits the wood to equal parts by mass of char and gas.  In Fig.~\ref{fig:pyro3d_wood_char}, you can see that the pine wood mass goes to zero, the char ends up with half the original wood mass, and the pyrolyzate gas production is equal to the char production.

\begin{figure}[!ht]
	\centering
	\includegraphics[height=2.2in]{SCRIPT_FIGURES/pyro3d_wood_char}
	\caption[PYRO3D char formation (the {\ct pyro3d\_wood\_char} case)]{Conversion of wood to char and pyrolyzate gas with 3D solid heat transfer and pyrolysis.}
	\label{fig:pyro3d_wood_char}
\end{figure}


\subsection{Burn Away (\texorpdfstring{\textct{box\_burn\_away1\_pyro3d\_vs\_pyro1d}}{box\_burn\_away1\_pyro3d\_vs\_pyro1d})}
\label{box_burn_away1_pyro3d_vs_pyro1d}

This case is a replicate of the {\ct box\_burn\_away1} case used as verification of the 1D pyrolysis solver (PYRO1D).  A foam block 0.4 m on a side (0.064 \si{m^3}) with a bulk density of 20 \si{kg/m^3} (total mass of 1.28 kg) is heated from a wall kept at 1000 \si{\degreeCelsius}.  The gas phase (and hence 3D solid phase) grid resolution is relatively coarse, $\delta x = 0.1 \;\si{m}$.  However, the cell spacing for the 1D solver is internally computed to be approximately $3 \times 10^{-3} \;\si{m}$.  The 1D solver thus resolves the temperature gradient near the surface on the inside of the solid.  The 3D solver uses an internal wall model to enhance the heat flux into the solid cell.  The verification target here is simply the total mass of 1.28 kg.  Results are shown for the 3D solver with and without mass transport of fuel gas.  In the latter, the gas is ejected to the nearest wall cell upon pyrolysis.

\begin{figure}[!ht]
	\centering
	\includegraphics[height=2.2in]{SCRIPT_FIGURES/box_burn_away1_pyro3d_vs_pyro1d}
	\caption[PYRO3D box burn away (the {\ct box\_burn\_away1\_pyro3d\_vs\_pyro1d} case)]{Comparison of burn away for 1D and 3D pyrolysis solvers.  Verification target is total mass.  Rate of pyrolysis varies between the methods due to the surface heat flux boundary condition and the difference in grid resolution.}
	\label{fig:box_burn_away1_pyro3d_vs_pyro1d}
\end{figure}

\subsection{Mass Loss Rate and Thickness (\texorpdfstring{\textct{pyro3d\_vs\_pyro1d}}{pyro3d\_vs\_pyro1d})}
\label{pyro3d_vs_pyro1d}

This case compares mass loss rates and material thickness for pyrolysis of black PMMA between the 1D pyrolysis solver without burn away and the 3D solver with burn away.  The 3D solver is effectively solving a 1D problem, so the results should be very similar.  In-depth radiation absorption is not considered.  The problem is set up with insulating sides for each column of material.  The material is heated from the top with an external flux of 50 \si{kW/m^2}.  The material thickness is 0.01 m.  The grid resolution of the 3D solver is set to be equivalent to the node spacing for the 1D solver, $\delta z = 2.8571 \times 10^{-4} \;\si{m}$.  The key difference between the solvers is that in the 1D solver the top face of the {\ct OBST} does not move, instead the material {\ct THICKNESS} changes and shrinks from the bottom up.  Conversely, in the 3D solver, cells burn away as their mass goes to zero.  If the material mass of a given cell goes below a threshold, the mass is shifted to a neighboring cell before the cell is burned away.  The final cell burns down to a numerical threshold mass before that mass is finally clipped for numerical reasons.  We still track the local solid volume within a cell, and this ratio times the cell size gives a measure of the material thickness for the 3D solver. Fig.~\ref{fig:pyro3d_vs_pyro1d} shows mass loss rate per unit area (left) and the material thickness (right) for the 1D and 3D solutions.  Note that in the 3D solution the ``thickness'' is taken as the integral of the volume ratio $V_{\rm solid}/V_{\rm cell}$ over the height of the column.

\begin{figure}[!ht]
	\centering
	\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
       \includegraphics[height=2.2in]{SCRIPT_FIGURES/pyro3d_vs_pyro1d_mlr} &
       \includegraphics[height=2.2in]{SCRIPT_FIGURES/pyro3d_vs_pyro1d_thickness}
    \end{tabular*}
	\caption[PYRO3D mass loss rate and material thickness (the {\ct pyro3d\_vs\_pyro1d} case)]{Comparison of thickness in 1D with burn away in 3D.  Verification targets are mass loss rate per unit area and material thickness curves.}
	\label{fig:pyro3d_vs_pyro1d}
\end{figure}

\subsection{Mass Transport (\texorpdfstring{\textct{pyro3d\_transport}}{pyro3d\_transport})}
\label{pyro3d_transport}

This case is a 3D version of the {\ct FAA\_Polymers\_PMMA} validation case.  A block of ``black'' PMMA 0.096 m $\times$ 0.096 m $\times$ 0.009 m, giving $8.294 \times 10^{-5} \;\si{m^3}$, with a bulk density of 1100 \si{kg/m^3}, giving 0.0912 kg of total mass, is heated from above with 52 \si{kW/m^2}, generating methane as a pyrolysis gas.  The verification target to confirm that as the PMMA is consumed the correct amount of methane gets produced.  The results are shown below in Fig.~\ref{fig:pyro3d_transport}.

\begin{figure}[!ht]
    \centering
    \includegraphics[height=2.2in]{SCRIPT_FIGURES/pyro3d_transport}
    \caption[PYRO3D with mass transport of fuel gas (the {\ct pyro3d\_transport} case)]{Check of mass conservation in conversion of solid (PMMA) to fuel gas (methane) with burn away using the 3D pyrolysis mass transport algorithm.}
    \label{fig:pyro3d_transport}
\end{figure}

\chapter{Lagrangian Particles}

This chapter contains verification cases that test all aspects of particles, droplets, sprays, and so on. Note that in FDS, Lagrangian particles are used for a variety of purposes, not just water droplets.

\section{Particle and Droplet Drag}

The cases in this section test accuracy, stability, and momentum conservation for the general case of momentum transfer between solid particles or liquid droplets and air. Details of the FDS integration scheme are given in the Technical Reference Guide~\cite{FDS_Tech_Guide}.  In short, we find an analytical solution for the case of binary fluid-particle interaction and apply this solution to the case of multiple particles by enforcing total momentum conservation within a fluid cell.  The resulting scheme is guaranteed to be stable because the fluid velocity cannot overshoot the cell equilibrium velocity (total momentum of fluid and particles divided by the total mass).

\subsection{Dragless Particle (\texorpdfstring{\textct{cannon\_ball}}{cannon\_ball})}
\label{cannon_ball}

This simple case tests the particle transport scheme in the absence of drag. A 1~cm diameter sphere is shot from ground level with an initial velocity of $(u_0,v_0,w_0)=(10,10,10)$~m/s. The ball is expected to fall back to the ground in $t=2\, w_0/g\approx 2.04$~s at which time it will have travelled a horizontal distance of $d=t \sqrt{u_0^2+v_0^2}\approx 28.86$~m. The grid has a resolution of 1~m, and the default time step is 0.5~s. Thus, the particle trajectory is computed via only 5 calls to particle transport routine. However, the integration is performed using sub-steps such that the particle cannot cross farther than a single grid cell in a sub-step. This ensures an accurate computation of the trajectory, as shown in Fig.~\ref{cannon_ball_fig}.

\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/cannon_ball}
\caption[The {\ct cannon\_ball} case]{Horizontal distance travelled by a dragless sphere as a function of time.}
\label{cannon_ball_fig}
\end{figure}


\subsection{Particles Swept Up in a Free Stream (\texorpdfstring{\textct{fluid\_part\_mom}}{fluid\_part\_mom})}

Consider a 1~m square duct that is 10~m long.  The boundary conditions are periodic in the streamwise direction and free slip along the inside walls. The fluid velocity is initialized to be 10~m/s. A monodisperse distribution of 1000 particles is initialized with zero velocity and random positions in the first cubic meter of the duct. Gravity is set to zero. As the case proceeds momentum is exchanged between the fluid and the particles. The results for all three tests are shown in Fig.~\ref{fig_fluid_part_mom}.  On the top, the green symbols represent the total momentum of the system, which, as can be seen, is conserved.  The fluid (blue) and the particle (red) momenta are closely following the analytical solution (solid lines) which is the basis of the scheme.  The plot on the bottom shows the fluid (blue) and particle (red) velocities compared to the system equilibrium velocity (green dashed line).  By construction of the method, both the fluid and the particle velocities are approaching the equilibrium velocity at long times.

\begin{figure}[h]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/fluid_part_momentum}\\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/fluid_part_velocity}
\caption[Test of fluid-particle momentum transfer for nonstationary particles]{Outputs of the \textct{fluid\_part\_mom} cases.  (Top) The fluid momentum (blue), the particle momentum (red), and the total momentum (green) are plotted for each coordinate direction, $x$ (circles), $y$ (inverted triangles), and $z$ (plus symbols).  The analytical solutions for the fluid and particle equations are shown by the solid blue and red lines, respectively. The total momentum should be constant, as indicated by the green symbols. (Bottom) The fluid (blue) and particle (red) velocities are plotted for each direction.  Also, the equilibrium velocity (total momentum [fluid plus particles] divided by the total mass) is shown as a dashed green line.  Stability of the momentum exchange is guaranteed because, by construction, the fluid velocity cannot overshoot the equilibrium velocity; the fluid velocity relaxes toward it.}
\label{fig_fluid_part_mom}
\end{figure}


\subsection{Particles Slowing Down a Gas Flow (\texorpdfstring{\textct{particle\_drag}}{particle\_drag})}
\label{particle_drag}
\label{particle_drag_U10_N16}
\label{particle_drag_U50_N16}
\label{particle_drag_U100_N16}
\label{particle_drag_U50_N1600}
\label{particle_drag_U100_N1600}
\label{particle_drag_U150_N1600}

The particle drag test cases consider a 1~m by 1~m by 1~m channel with periodic boundary conditions on the $x$-faces and \textct{FREE\_SLIP} walls on $y$- and $z$-faces. Static droplets are placed in the center of the channel, one particle per computational cell, so that they form a surface perpendicular to the flow direction. Gravity is set to zero. Due to the symmetry of the problem, the flow is one dimensional. Assuming that the droplets are of uniform diameter  and the drag coefficient and gas density are constant, the velocity in the channel decays according to
\be u=\frac{u_{0}}{1 + B \, u_{0} \, t}  \quad ; \quad B=\frac{1}{2}\frac{\sum \, C_{D} \, \pi \, r_{d}^{2}}{V} \ee
In the above, $V$ is the volume of the channel, $r_{d}$ is the droplet radius, $C_{D}$ is the droplet drag coefficient, and $u$ is the gas velocity in the $x$-direction. The summation is over all $N$ particles.
The common parameters used in all the simulations are: $C_{\rm d}=10$, $r_{\rm d}=0.005$~m. The initial velocity, $u_0$, for Cases~A-F are 10, 50, 100, 50, 100, and 150~m/s, respectively. Comparisons of computed and analytical results are shown in Fig.~\ref{particle_drag_plots}.

\begin{figure}[p]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_drag_A} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_drag_D} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_drag_B} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_drag_E} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_drag_C} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/particle_drag_F}
\end{tabular*}
\caption[Sample cases \textct{particle\_drag}]{Outputs of the \textct{particle\_drag} test cases compared with analytical solutions.}
\label{particle_drag_plots}
\end{figure}




\subsection{Stationary Spherical Particles in a Duct (\texorpdfstring{\textct{sphere\_drag}}{sphere\_drag})}
\label{sphere_drag_1}
\label{sphere_drag_2}

Consider a 2~m long duct with a 1~m square cross section, fixed air velocity of $u_0=2$~m/s, and free-slip walls. Three ducts are stacked vertically, each with its own mesh and a plane of particles spanning the duct at its center point. The particles are 1~cm in diameter and 10~particles are specified in each grid cell. The expected pressure drop is given by the formula:
\be \Delta p=\frac{1}{2} \rho \frac{\sum \, C_{\rm d} \, \pi \, r_{\rm p}^{2} \, u_0^2} {A} \ee
where $A$ is the 1~m$^2$ cross-sectional area, $\rho=1.2$~kg/m$^3$ is the density of air, and the summation is over 4000 particles. For specified drag coefficients of 5, 10, and 20 in the three ducts, the pressure drops are expected to be 3.77~Pa, 7.54~Pa, and 15.1~Pa.  Comparisons of computed and analytical results are shown in the left hand plot of Fig.~\ref{sphere_drag_fig}.

In a second test case, consider a single 10~m long, 1~m square duct. Spherical particles 2~mm in diameter with a density of 514~kg/m$^3$ are randomly distributed in the section of the duct between 4~m and 5~m from the upstream end. The particle mass per unit volume is set to 1.66~kg/m$^3$. The number of particles included in the simulation is 10000, which means that each particle actually represents 77.1 real particles. The drag coefficient is approximately 1.6, based on the local Reynolds number, which is about 40. The free stream velocity in the duct is 0.3~m/s, but the speed varies slightly within the cloud of particles. The pressure is expected to drop linearly from approximately 0.21~Pa to 0~Pa over the 1~m of duct filled by particles, as shown in the right hand plot of Fig.~\ref{sphere_drag_fig}.

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/sphere_drag_1} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/sphere_drag_2}
\end{tabular*}
\caption[The {\ct sphere\_drag} cases]{Outputs of the {\ct sphere\_drag} test cases compared with analytical solutions.}
\label{sphere_drag_fig}
\end{figure}


\subsection{Drag Caused by Vegetation (\texorpdfstring{\textct{vegetation\_drag}}{vegetation\_drag})}
\label{vegetation_drag_1}
\label{vegetation_drag_2}

Vegetation (leaves, grasses, etc.) is sometimes modeled using Lagrangian particles with flat, cylindrical, or spherical geometries. In this test case. cylindrical particles represent pine needles. Consider a 4~m long duct with a 1~m square cross section, fixed air velocity of $u_0=2$~m/s, and free-slip walls. Three ducts are stacked vertically, each with a 10~cm uniform mesh and a 1~m by 1~m by 1~m volume filled with particles spanning the duct near its center. The cylindrical particles are $D=1$~mm in diameter and $L=2$~cm long. In the lowest duct, 5000 particles are inserted randomly throughout the volume. In the middle duct, 1 particle is inserted at the center of each grid cell within the volume containing the pine needles. In the top duct, 5 particles are inserted randomly in each grid cell, for a total of 5000 particles. The drag coefficient for each cylindrical particle is given by the empirical relation:
\be
   C_{\rm d} = 10 \, \frac{0.6 + 0.4 \, \RE^{0.8}}{\RE} \approx 1.55 \quad ; \quad \RE = \frac{\rho \, u_0 \, D}{\mu_{\rm air}} \approx 132.9
\ee
The viscosity of air at 20~$^\circ$C is $\mu_{\rm air}=1.8\times 10^{-5}$~kg/(m$\cdot$s).

\subsubsection{Conventional Notation}

The pressure drop in each duct is expected to the be same, regardless of how the particles are inserted:
\be
   \Delta p=-\frac{1}{2} \rho \frac{n_{\rm p} \, C_{\rm d} \, A_{\rm c} \, u_0^2} {A} \approx -18.9 \; {\rm Pa}  \quad ; \quad n_{\rm p}=\frac{m''' \, V}{\pi \, r^2 \, L \, \rho_{\rm p}} \approx 254648  \label{pressure_drop_1}
\ee
where $A$ is the 1~m$^2$ cross-sectional area of the duct, $A_{\rm c}=LD$ is the cross sectional area of the cylindrical particle, and $\rho=1.196$~kg/m$^3$ is the density of air. The number of actual pine needles within the volume, $n_{\rm p}$, is the mass per unit volume, $m'''=2$~kg/m$^3$, times the volume, $V=1$~m$^3$, divided by the mass of an individual pine needle. The density of the needle is $\rho_{\rm p}=500$~kg/m$^3$. Comparisons of computed and analytical pressure drops are shown in the left plot of Fig.~\ref{vegetation_drag_fig}. Differences between the ideal and computed results are due to the fact that the air velocity is not exactly 2~m/s within the volume filled with the particles. In particular, the duct filled randomly with particles exhibits the greatest deviation from the ideal because the velocity does not remain uniform within the volume.

\subsubsection{Notation used by the Wildland Fire Community}

The notation used in the previous section is inconvenient when characterizing the drag force exerted by actual vegetation that cannot be assumed to be perfect spheres or cylinders. Instead, Eq.~(\ref{pressure_drop_1}) can be rewritten as follows:
\be
   \Delta p=-\frac{L}{2} \rho \, C_{\rm d} \, C_{\rm s} \, \beta \, \sigma \, u_0^2 \approx -18.9 \; {\rm Pa}  \label{pressure_drop_2}
\ee
Here, $C_{\rm s}$ is the ratio of the particle's cross sectional area to surface area, which is approximately $1/\pi$ for objects that are cylindrical in shape. $\beta$ is the packing ratio, which is the ratio of the volume occupied by the solid particles to the overall volume of particle-laden region; 0.004 in this case. $\sigma$ is the surface to volume ratio of an individual particle; $2/r$ for a cylinder.

\subsubsection{Pressure Drop due to Mass-Generating Particles}

Using this same basic configuration, another test is performed where the cylindrical particles now exert no drag force on the air flow, but instead generate additional air at a rate of 0.1~kg/(m$^2 \cdot$s). The surface area of each of the 254648 particles is $6.28 \times 10^{-5}$~m$^2$, resulting in a total air injection rate of $\dot{m}=1.6$~kg/s. The momentum equation becomes one-dimensional and time-independent:
\be
   \frac{\d}{\d x} \left( \frac{p}{\rho} + \frac{u^2}{2} \right) = - \frac{1}{\rho} \frac{\dot{m}}{V} \, u  \label{simmom}
\ee
Using the subscript 1 to denote the upstream region of the duct, and 2 the downstream, the air velocity increases as it passes through the particles: $u_2=u_1+\dot{m}/(\rho \, A)$. Multiplying Eq.~(\ref{simmom}) by the constant density, $\rho$, and integrating both sides over the length of the duct containing the particles:
\be
   \Delta p \equiv p_2-p_1 =  - \rho \, \frac{u_2+u_1}{2} \, (u_2-u_1) - \frac{\dot{m}}{A} \, \frac{u_2+u_1}{2} = -8.534  \; {\rm Pa}
\ee
The results are shown in the right hand plot of Fig.~\ref{vegetation_drag_fig} for the various different methods of representing the particles in the model.

\begin{figure}[ht]
\includegraphics[height=2.2in]{SCRIPT_FIGURES/vegetation_drag_1}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/vegetation_drag_2}
\caption[The {\ct vegetation\_drag} test cases]{Pressure drop in duct filled with pine needles for three different particle insertion methods.}
\label{vegetation_drag_fig}
\end{figure}



\subsection{Mesh Screen in a Duct (\texorpdfstring{\textct{screen\_drag}}{screen\_drag})}
\label{screen_drag_1}
\label{screen_drag_2}

These two test cases consider a 1 m wide by 1 m tall by 2 m long channel with either a 2 m/s or a 20 m/s fixed velocity boundary condition fixed velocity boundary condition on one end, an \textct{OPEN} boundary condition on the other end, and \textct{FREE\_SLIP} on the $y$- and $z$-faces.  Three channels are stacked vertically (each with its own \textct{MESH}, and a plane of particles is placed across each channel at 1 m.  The plane of particles are defined as a screen with a wire diameter of 0.0003 m.  A \textct{FREE\_AREA\_FRACTION} of 0.1, 0.4, and 0.8 is set for the particles in the channels.  According to the screen drag formula
\be
   \Delta p \;= \; \left( \frac{\mu}{K} u \; + \; \rho \frac{Y}{\sqrt{K}} u^2 \right) \Delta x_{\rm screen}
\ee
where $K$ and $Y$ are empirical constants defined in the FDS User's Guide, the pressure drops for the 2 m/s inlet should be 126 Pa, 14 Pa, and 5.3 Pa, and for the 20 m/s inlet should be 1260 Pa, 168 Pa, and 124 Pa.   Comparisons of computed and analytical results are shown in Fig.~\ref{screen_drag_plots}.

\begin{figure}[ht]
\includegraphics[height=2.2in]{SCRIPT_FIGURES/screen_drag_1}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/screen_drag_2}
\caption[Sample cases \textct{screen\_drag}]{Outputs of the \textct{screen\_drag} test cases compared with analytical solutions.  Left 2~m/s inlet, right 20~m/s inlet.  The three cases represent different values of \textct{FREE\_AREA\_FRACTION} (0.1, 0.4, and 0.8) within the channel.}
\label{screen_drag_plots}
\end{figure}

\subsection{Flow through Porous Media (\texorpdfstring{\textct{porous\_media}}{porous\_media})}
\label{porous_media}

This case involves a 2~m long duct with a 0.5~m by 0.5~m cross section and 1~m/s flow in the $x$ direction. An 8.5~cm thick block of rigid aluminum foam is positioned in the duct. The pressure drop induced by the foam is expected to be approximately:
\be
   \Delta p \approx \delta \left( \frac{\mu}{\hbox{K}} u \; + \; \rho \frac{\hbox{Y}}{\sqrt{\hbox{K}}} u^2 \right)
\ee
where ${\rm K}=1 \times 10^{-7}$~m$^2$ and ${\rm Y}=0.1$ in all three coordinate directions. The block thickness $\delta=0.085$~m, the velocity $u=1$~m/s, the air density $\rho=1.2$~kg/m$^3$, and the air viscosity $\mu=1.8 \times 10^{-5}$~kg/m/s. Comparisons of computed and analytical results for three different grid resolutions (1 corresponds to low resolution, 2 medium, 3 fine) are shown in Fig.~\ref{porous_media_plot}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/porous_media}
\caption[Results of the \textct{porous\_media} test case]{Pressure drop caused by a block of aluminum foam.}
\label{porous_media_plot}
\end{figure}




\subsection{Particle Terminal Velocity (\texorpdfstring{\textct{terminal\_velocity}}{terminal\_velocity})}

If a single particle with a constant drag coefficient falls through a stationary fluid, its terminal velocity can be found analytically. The equation governing this motion is
\be
    \frac{\d u}{\d t} = K u^2 - g \quad ; \quad K \equiv \frac{\rho_{\rm a} C_{\rm d} A}{2 m}
\ee
where $\rho_{\rm a}$ is the air density, $C_{\rm d}=1$ is the drag coefficient, $A$ is the cross-sectional area of the particle, and $m$ is the mass. Defining $\rho_{\rm d}=1000$~kg/m$^3$ as the particle density and $D=0.01$~m as the particle diameter, the solution of the ODE is:
\be
    u = \frac{\d x}{\d t} = - \sqrt{\frac{g}{K}} \; \text{tanh}\left(\sqrt{g K} t\right) \quad ; \quad
    x = - \frac{\text{ln}\left[\text{cosh}\left(\sqrt{g K} t \right)\right]}{K} \quad ; \quad
    K \equiv \frac{3 \rho_{\rm a} C_{\rm d}}{4 \rho_{\rm d} D}
\ee
The $L_\infty$ (maximum) error of the FDS computed terminal velocity and position are computed and plotted for each time step. As shown in Fig.~\ref{fig_terminal_velocity_convergence}, FDS exhibits second-order convergence for both the velocity and position.

\begin{figure}[h]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/terminal_velocity_convergence} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/position_convergence}
\end{tabular*}
\caption[Convergence analysis of the \textct{terminal\_velocity} case]{(Left) FDS convergence for the particle velocity in the \textct{terminal\_velocity} case. (Right) FDS convergence for the particle position in the \textct{ terminal\_velocity} case.}
\label{fig_terminal_velocity_convergence}
\end{figure}

%
%\section{Accuracy of Fluid-Particle Momentum Transfer}
%In Appendix G of the Technical Reference Guide the numerical scheme FDS uses to compute these trajectories is detailed. The equation for particle velocities is
%\begin{equation}
%   \mathbf{u}_p^{n+1} = \frac{\mathbf{u}_p^n}{1 + \beta_p \Delta t} + \frac{(\mathbf{u}_p^n + \alpha_p \mathbf{U}_p^n)\beta_p \Delta t}{(1 + \beta_p \Delta t)(1 + \alpha_p)} + \mathbf{g} \Delta t - \frac{\alpha_p \beta_p (\Delta t)^2}{2 (1 + \alpha_p)} \left[\mathbf{u}_r^n \left(\frac{\mathbf{u}_r^n \cdot \mathbf{g}}{|\mathbf{u}_r^n|^2}\right) + \mathbf{g}\right] \,.
%\end{equation}
%And the equation for particle positions is
%\begin{equation}
%   \mathbf{x}_p^{n+1} = \mathbf{x}_p^n + \left(\frac{\mathbf{u}_p^n + \alpha_p \mathbf{U}_p^n}{1 + \alpha_p}\right) \Delta t + \frac{\alpha_p (\mathbf{u}_p^n - \mathbf{U}_p^n)}{\beta_p (1 + \alpha_p)} \text{ln}(\beta_p \Delta t + 1) + \frac{\mathbf{g} (\Delta t)^2}{2} - \frac{\alpha_p \beta_p (\Delta t)^3}{6 (1 + \alpha_p)} \left[\mathbf{u}_p^n \left(\frac{\mathbf{u}_p^n \cdot \mathbf{g}}{|\mathbf{u}_p^n|^2}\right) + \mathbf{g}\right] \,.
%\end{equation}
%The particle velocities are second-order accurate in time. In other words, they are accurate to an order-of-magnitude of $\Delta t^2$. The error committed each time step as shown in Appendix G is
%\begin{equation}
%   \epsilon = \mathcal{O}(\Delta t^3) \,.
%\end{equation}
%This error is accumulated over many time steps. The allows us to define the total error $E \equiv n \epsilon$ where $n = T/\Delta T$ is the number of time steps and $T$ is the final time iterated out to. The total error can be found to be
%\begin{equation}
%   E = n \epsilon = \frac{T}{\Delta t} \mathcal{O}(\Delta t^3) = \mathcal{O}(\Delta t^2) \,.
%\end{equation}
%The particle velocities should be second-order accurate, as has been shown in FDS.
%
%
%The accuracy of the particle positions, $\mathbf{x}$ is less obvious and finding their accuracy requires knowledge of the accuracy of $\mathbf{u}$. The natural log term of the position equation reduces the order of accuracy. Note that
%\begin{equation}
%   \frac{\alpha_p (\mathbf{u}_p^n - \mathbf{U}_p^n)}{\beta_p (1 + \alpha_p)} \text{ln}(\beta_p \Delta t + 1) = \frac{\alpha_p (\mathbf{u}_p^n - \mathbf{U}_p^n)}{1 + \alpha_p} \left(\Delta t - \frac{\beta_p \Delta t^2}{2} + \cdots \right) \quad \text{ for } \beta_p t < 1 \,.
%\end{equation}
%Also note that $\mathbf{u}_p^n = \mathbf{u}_{p,\text{exact}}^n + \mathcal{O}(\Delta t^2)$ in general. This error propagates through the natural log term. If only the relevant parts of the term are extracted we can see that
%\begin{equation}
%   \frac{\mathbf{u}_p^n}{\beta_p} \text{ln}(\beta_p \Delta t + 1) = (\mathbf{u}_{p,\text{exact}}^n + \mathcal{O}(\Delta t^2)) \left(\Delta t - \frac{\beta_p \Delta t^2}{2} + \cdots \right) = \frac{\mathbf{u}_{p,\text{exact}}^n \text{ln}(\beta_p \Delta t + 1)}{\beta_p} + \mathcal{O}(\Delta t^3) \,.
%\end{equation}
%This third-order error per time step becomes an accumulated second-order error, and consequently the position scheme is only second-order accurate as has been shown numerically.
%
%
%Due to this error, the $\Delta t^3$ term of the position equation is dropped because it offers no improvements in accuracy but requires more computation.



\subsection{Particle Trajectory (\texorpdfstring{\textct{flat\_fire}}{flat\_fire})}
\label{flat_fire}

There are no known solutions of the particle trajectory equations in multiple dimensions. However, ballisticians have developed an approximate solution useful for computing trajectories of projectiles when guns are shot within a certain range of angles. This solution makes use of the ``flat fire'' assumption. In short, if a particle is launched with its velocity in only the horizontal direction and its vertical velocity is relatively small compared to the horizontal velocity, then throughout the entire trajectory the horizontal velocity component, $u_{\rm p}$, is a good approximation for the velocity magnitude, $|\mathbf{u_{\rm p}}|$. In 2D, this approximation decouples the horizontal ($x$) equation of motion from the vertical ($z$) and reduces the vertical equation of motion to a linear ODE:
\begin{align}
   &\frac{\d u_{\rm p}}{\d t} = -K \, u_{\rm p}^2 \quad ;  \quad K \equiv \frac{3 \rho_{\rm a} C_{\rm d}}{8 \rho_{\rm p} r_{\rm p}} \\[.1in]
   &\frac{\d w_{\rm p}}{\d t} = -K \, u_{\rm p} \, w_{\rm p} - g
\end{align}
Given the initial conditions, $x_{\rm p}(0) = 0$, $u_{\rm p}(0) = V_0$, $z_{\rm p}(0) = h$, $w_{\rm p}(0) = 0$, the exact solution to the ODE is:
\begin{align}
    x_{\rm p} = \frac{\ln(V_0 K t + 1)}{K} \quad ;& \quad
    z_{\rm p} = h + \frac{g \, \ln(V_0 K t + 1)}{2 (V_0 K)^2} - \frac{g t^2}{4} - \frac{g t}{2 V_0 K} \\[.1in]
    u_{\rm p} = \frac{V_0}{V_0 K t + 1} \quad ;& \quad w_{\rm p} = \frac{g}{2 V_0 K \, (V_0 K t + 1)} - \frac{g t}{2} - \frac{g}{2 V_0 K}
\end{align}
The following case was run in FDS and compared against the approximate solution:
\begin{center}
\begin{tabular}{|r|c|l|}
\hline
Drag coefficient                  & $C_{\rm d}$          & 0.2 \\
Particle diameter                 & $2\, r_{\rm p}$      & 5~mm \\
Gravitational acceleration        & $g$                  & 9.8~m/s$^2$ \\
Particle density                  & $\rho_{\rm p}$       & 1000~\si{kg/m^3} \\
Air density                       & $\rho_{\rm a}$       & 1.2~\si{kg/m^3} \\
Initial horizontal velocity       & $V_0$                & 400~m/s \\
Initial height                    & $h$                  & 8 m \\
\hline
\end{tabular}
\end{center}
Figure~\ref{flat_fire_plots} compares the first and second order accurate FDS solutions to the ``flat fire'' solution given above. The ``flat fire'' solution should have a slightly faster vertical velocity component, $w_{\rm p}$, at extended times because the speed of the particle is approximated with $u_{\rm p}$, which is lower than the true speed. This ensures the drag force is lower than it should be, and consequently $|w_{\rm p}|$ is larger in the ``flat fire'' solution. In the lower left plot in Fig.~\ref{flat_fire_plots} $|w_{\rm p}|$ computed by FDS using the second order accurate scheme is slightly less than the ``flat fire'' solution.
\begin{figure}[!ht]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/flat_fire_trajectory} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/flat_fire_x} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/flat_fire_z} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/flat_fire_u} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/flat_fire_w} &
\end{tabular*}
\caption[Results of the \textct{flat\_fire} test case.]{Results of the \textct{flat\_fire} test case.}
\label{flat_fire_plots}
\end{figure}



\clearpage

\section{Radiation Absorption by Particles}

\subsection{Radiation Absorption by Vegetation}
\label{vegetation_absorb}

In this example, six channels, each measuring 4~m by 1~m by 1~m, are filled with various amounts of particles that represent vegetation---shrubbery, for example. The vegetation occupies exactly one cubic meter within each channel. One end of each channel is a solid wall with temperature $T_{\rm hot}= 1273$~K, and the opposite end is a wall with temperature $T_{\rm cold}=0$~K. Each wall has an emissivity of 1 and a heat transfer coefficient of 0. The side walls of the channels are ``mirror'' boundaries which essentially means that the end walls and vegetation layer are infinitely wide, rendering the configuration one-dimensional. With no particles present, the radiative intensity, or {\em radiance}, in the axial direction at the hot wall is $I_0=\sigma T_{\rm hot}^4/\pi \approx 47.4$~kW/(m$^2 \cdot$sr). With particles present, the radiance is expected to attenuate according to the following:
\be
   I = I_0 \, \hbox{e}^{-C_{\rm s} \beta \sigma_{\rm p} L}
\ee
where $C_{\rm s}$ is the particle shape factor, $\beta$ is the ``packing ratio,'' $\sigma_{\rm p}$ is the particle surface area to volume ratio, and $L=1$~m is the depth of the vegetation layer. It is assumed that the vegetation in this case consists of uniformly sized cylinders that are 1~mm in diameter and 2~cm long. The shape factor is taken to be the ratio of the cylinder's cross sectional area to surface area when oriented normal to the central axis of the channel, or $1/\pi$. The packing ratio is $m'''/\rho_{\rm p}$, the vegetation mass per unit volume, or bulk density, divided by the density of the vegetation itself. $\rho_{\rm p}=500$~kg/m$^3$ in this example. The surface area to volume ratio of the cylinder is $2/r=4000$~m$^{-1}$, where $r$ is the radius of the cylinder. Figure~\ref{vegetation_absorb_fig} displays the comparison of the expected radiative heat flux versus that calculated by FDS.
\begin{figure}[!ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/vegetation_absorb}
\caption[Results of the \textct{vegetation\_absorb} test case.]{Decrease in radiance caused by layers of vegetation of various densities.}
\label{vegetation_absorb_fig}
\end{figure}


\clearpage

\section{Water Droplet Evaporation (\texorpdfstring{{\textct{water\_evaporation}}}{water\_evaporation}) }
\label{water_evaporation}

The cases called \textct{water\_evaporation\_x} test the water evaporation routine in FDS. The geometry consists either of
a sealed box or a tunnel with a cross flow. The walls are assumed adiabatic, meaning that there are no leaks or heat losses.
For the box cases, the air within the box is stirred to maintain uniform conditions.
In each case, the numerical solutions are compared to analytical solutions.

For Cases 1-3 where the water droplets are confined to a sealed box, the change in the enthalpy of the droplets should equal the change in the enthalpy of the gas minus the work
performed due to pressure. It is the internal energy of the system that is conserved. The internal energy can be expressed in terms of the
enthalpy, pressure and density:
\begin{equation} e = h - \frac{p}{\rho} \end{equation}
In differential form:
\begin{equation} \d e = \d h - \frac{1}{\rho} \d p - p \d \left(\frac{1}{\rho} \right) = \d h - v \d p - p \d v \end{equation}
Multiplying by mass and noting that the volume, $V$, is constant yields:
\begin{equation} \d E = \d H - V \d p \end{equation}
The enthalpy
decrease of the liquid water droplets is equal to the enthalpy gain of the gas (both expressed in kJ) minus the
pressure increase times the volume in
units of kPa and m$^3$, respectively.

\subsection{Case 1}
\label{water_evaporation_1}

In the first case, the dimensions of the box are 1~m on a side, the initial
air temperature is 200~\si{\degree C}, the median volumetric diameter of the droplets is 200~$\mu$m, the water temperature is 20~\si{\degree C}, and the total
mass of water droplets is 0.01~kg. The initial mass fraction of water vapor is 0.
It is expected that the droplets will all evaporate within about 10~s.
Figure~\ref{water_evaporation_1_plots} displays
the average enthalpy, humidity, density, temperature, pressure, and mass of water vapor within the box.
The solid horizontal lines denote the expected steady-state values.

\begin{figure}[p]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_1_enthalpy} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_1_humidity} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_1_density} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_1_temperature} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_1_pressure} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_1_water_mass}
\end{tabular*}
\caption[Sample case \textct{water\_evaporation\_1}]{Output of the \textct{water\_evaporation\_1} test case.}
\label{water_evaporation_1_plots}
\end{figure}

\subsection{Case 2}
\label{water_evaporation_2}

In the second case, the dimensions of the box are 40~cm on a side, and the initial
air temperature is 500~\si{\degree C}. There is only one fictitiously large water droplet in the box whose diameter is 10~cm and whose temperature is 20~\si{\degree C}.
The initial mass fraction of water vapor is 0. It is expected that the water will evaporate until the air in the box is saturated. The analytical solution for the stationary state is derived from the first law of thermodynamics and the Clausius-Clapeyron equation by assuming that the liquid water temperature is equal to air temperature at the steady state. Results are shown in Fig.~\ref{water_evaporation_2_plots}.

\begin{figure}[p]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_2_enthalpy} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_2_humidity} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_2_density} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_2_temperature} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_2_pressure} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_2_W_density}
\end{tabular*}
\caption[Sample case \textct{water\_evaporation\_2}]{Output of the \textct{water\_evaporation\_2} test case.}
\label{water_evaporation_2_plots}
\end{figure}

\subsection{Case 3}
\label{water_evaporation_3}

In the third case, the dimensions of the box are 1~m on a side, the initial
air temperature is 500~\si{\degree C}, the  initial diameter of all the droplets is 200~$\mu$m, the water temperature is 20~\si{\degree C},
and the total mass of water droplets is 0.1~kg. The initial mass fraction of water vapor is 0. It is expected to reach the saturation state.
As in the second case, the analytical solution for the stationary state derives from the first principle of thermodynamics and the Clausius-Clapeyron equation
by assuming that the liquid water temperature is equal to air temperature at the stationary state.  Results are shown in Fig.~\ref{water_evaporation_3_plots}.

\begin{figure}[p]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_3_enthalpy} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_3_humidity}\\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_3_density} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_3_temperature}\\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_3_pressure}&
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_3_W_density}
\end{tabular*}
\caption[Sample case \textct{water\_evaporation\_3}]{Output of the \textct{water\_evaporation\_3} test case.}
\label{water_evaporation_3_plots}
\end{figure}


\subsection{Case 4}
\label{water_evaporation_4}

In the fourth case, air at 500~\si{\degree C} is forced through a 3~m long, 1~m wide, 1~m tall tunnel at 1~m/s. Water droplets with a median volumetric diameter of 20~$\mu$m are
introduced in the middle of the tunnel at a rate of 0.05~kg/s, starting at 10~s. The water temperature is 20~\si{\degree C}.
The mass fraction of water vapor in the hot air flowing into the tunnel is 0.
The water evaporates at approximately the same rate at which it is introduced.
Figure~\ref{water_evaporation_4_plot}, left, displays the time history of the enthalpy flow out of the tunnel. The enthalpy flow rate of the dry hot air is 229~kW above its ambient value. The steady-state temperature is 211~\si{\degree C}. FDS reports heat flow as the difference in enthalpy of the flowing gas at its current temperature from that at ambient temperature.  For the steady-state condition of 0.05~kg/s in the air flow at 211~\si{\degree C} the heat flow is expected to be 107 kW.


\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_4_enthalpy}
\caption[Sample case \textct{water\_evaporation\_4}]{Output of \textct{water\_evaporation\_4} test case.}
\label{water_evaporation_4_plot}
\end{figure}

\subsection{Case 5}
\label{water_evaporation_5}

This test involves a single evaporating water droplet in relatively dry air. The comparison is made with an actual measurement~\cite{Ranz} where a 1~mm water droplet
shrinks to approximately 0.3~mm in approximately 10~min (see Fig.~\ref{water_evaporation_5_plot}, right).
As opposed to the other cases above, this case tests the predicted rate of evaporation, not the final steady state.

\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_5_diameter}
\caption[Sample case \textct{water\_evaporation\_5}]{Output of \textct{water\_evaporation\_5} test case.}
\label{water_evaporation_5_plot}
\end{figure}

\subsection{Case 6}
\label{water_evaporation_6}

This case tests the conservation of energy between droplets, surfaces, and the gas. It also demonstrates that one can specify thermophysical properties rather than rely on tabulated data. A box with volume, $V=1$~m$^3$, is filled with gas with the following properties: $m_{\rm g,0}=1$~kg, $c_{p,\rm g}=1$~\si{kJ/(kg.K)}, $W=28$~g/mol, $T_{{\rm g},0}=373.15$~K.  The box is filled with droplets with total mass, $m_{\rm d}=0.1$~kg, specific heat, $c_{\rm l}$ = 2~\si{kJ/(kg.K)}, and heat of vaporization, $h_v=173.15$~kJ/kg. The droplets evaporate into the same gas as the background.  The droplets have an initial temperature, $T_{\rm d,0}=293.15$~K, and a boiling point, $T_{\rm b}=373.15$~K. All walls of the box except the floor are adiabatic.  The floor is thermally thin (e.g., high conductivity compared to its thickness), with a perfectly insulated backing. It has a total mass, $m_{\rm w}=1$~kg, a specific heat, $c_{\rm w}=1$~\si{kJ/(kg.K)}, and an initial temperature, $T_{\rm w,0}=523.15$~K.  After approximately 100~s, all the droplets evaporate, the wall and the gas temperatures converge to a single final temperature, $T_{\rm g,f}$, and the pressure rises to $p_{\rm f}$ (see Fig.~\ref{water_evaporation_6_plots}). The final gas temperature can be found by solving the equation, $\Delta E = \Delta H - V \Delta p$, where $\Delta E$ is the energy transferred from the hot floor to the gas, $\Delta H$ is the increased enthalpy of the gas due to the convective heating of the floor and the evaporation of the water droplets, and $\Delta p$ is the change in gas pressure.
\begin{eqnarray*}
\Delta E &=& m_{\rm w} \, c_{\rm w} \, (T_{{\rm w},0}-T_{\rm g,f}) \\[.1in]
\Delta H &=& m_{\rm g,0} \, c_{p,{\rm g}} \, (T_{\rm g,f}-T_{\rm g,0} ) + m_{\rm d} \Big( c_{\rm l} \, (T_{\rm b}-T_{\rm d,0}) + c_{p,{\rm g}} \, (T_{\rm g,f}-T_{\rm b}) + h_v  \Big) \\[.1in]
\Delta p &=& \frac{R}{W \, V} \left( m_{\rm g,f} \, T_{\rm g,f} - m_{\rm g,0} \, T_{\rm g,0} \right) \quad ; \quad R = 8.314 \; \hbox{J/mol/K}
\end{eqnarray*}
The final temperature is calculated to be 445.2~K (172.0~$^\circ$C) and the pressure increase is 34.6~kPa.


\begin{figure}[h!]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_6_T} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_6_P}
\end{tabular*}
\caption[Sample case \textct{water\_evaporation\_6}]{Output of \textct{water\_evaporation} case 6.}
\label{water_evaporation_6_plots}
\end{figure}

\subsection{Case 7}
\label{water_evaporation_7}

In this case, a gas burner lies near the bottom of a 1~m by 1~m by 5~m high vertical channel whose walls are made of a thin sheet of insulated steel. Air at ambient temperature is forced into the bottom of the channel at 1~m/s. Monodisperse water droplets with a diameter of 2,000~$\mu$m are
introduced via a nozzle in the middle of the channel at a rate of 1~L/min, starting at 60~s. The water temperature is 20~\si{\degree C}, and the spray is directed at the walls with an initial velocity of 5~m/s.
The water completely evaporates before it drips down to the bottom of the channel.
Figure~\ref{water_evaporation_7_plot} displays the energy balance for this case. The heat release rate, \textct{HRR}, of the fire is expected to be 384~kW. The rate at which the water droplets extract energy from the system, \textct{Q\_PART}, is expected to be
\be - \left( 4.189 \; \hbox{\si{kJ/(kg.K)}} \times 80 \; \hbox{K} + 2269 \; \hbox{kJ/kg} \right) \times 1/60 \; \hbox{kg/s} = -43.4 \; \hbox{kW} \ee
The sum of all the terms, \textct{Q\_TOTAL}, is expected to be zero. The three other quantities, \textct{Q\_COND}, \textct{Q\_RADI}, \textct{Q\_CONV}, all have plausible values, but there is no way to determine the exact values.

\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_7}
\caption[Sample case \textct{water\_evaporation\_7}]{Output of \textct{water\_evaporation} case 7.}
\label{water_evaporation_7_plot}
\end{figure}


\subsection{Case 8}
\label{water_evaporation_8}

In this case, we compare FDS predictions against the evaporation model of Li and Chow \cite{LiChow:2008}. This case replicates Fig.~6 of the Li and Chow paper.  The simulation consists of an injection of a 100~$\mu$m droplet at 10~$^\circ$C into 60~$^\circ$C air with an initial water vapor mass fraction of 10~\%. The initial speed of the droplet is 3 m/s in the negative $z$ direction (downward with gravity turned on).  Results for droplet position are shown on the left in Fig.~\ref{water_evaporation_8_plots}.  Results for the droplet diameter are shown on the right.

\begin{figure}[h!]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_8_z} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/water_evaporation_8_d}
\end{tabular*}
\caption[Sample case \textct{water\_evaporation\_8}]{Output of \textct{water\_evaporation} case 8.}
\label{water_evaporation_8_plots}
\end{figure}


\section{Flow Rate and Pipe Networks (\texorpdfstring{{\textct{flow\_rate\_2}}}{flow\_rate\_2}) }
\label{flow_rate_2}

In this test case four sprinklers are placed in a room.  The first three sprinklers are on one pipe network (\textct{PIPE\_INDEX = 1}) and the fourth sprinkler is on a second pipe network (\textct{PIPE\_INDEX = 2}).  The sprinklers are defined with a pressure ramp such that all of the sprinklers within a pipe network flow at a combined rate of 10~L/min regardless of the number of open heads.  The sprinklers are set to open every 15~s and to close at 60~s.  After 45~s, the first three sprinklers (black line) have opened for a combined flow rate of 10~L/min and an accumulated water mass of 7.5~kg.  At 60~s, the fourth sprinkler (red line) flowing at 10 L/min plus the first three sprinklers flowing at 10~L/min have produced 12.5~kg of water. The results are shown in Fig.~\ref{flow_rate_2_figure}.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/flow_rate_2_open_nozzles} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/flow_rate_2_water_mass}
\end{tabular*}
\caption[The \textct{flow\_rate\_2} case]{Output of the \textct{flow\_rate\_2} test case.}
\label{flow_rate_2_figure}
\end{figure}



\section{Turbulent Dispersion (\texorpdfstring{{\textct{random\_walk}}}{random\_walk}) }
\label{turbulent_dispersion}
\label{random_walk}

Two cases are set up to test the turbulent dispersion of tracer particles.  Tracer particles are injected into a channel with a steady laminar flow with mean velocity 1 m/s.  In the first case (\textct{random\_walk\_1}), the diffusivity is set to $D=0.0834$~m$^2$/s (this value results from setting the dynamic viscosity to $\mu = 0.1$~kg/(m$\cdot$s) with an ambient density of $\rho=1.199$~\si{kg/m^3} and a Schmidt number of unity).  In the second case (\textct{random\_walk\_2}), the diffusivity is set to $D=0.00834$ m$^2$/s.  The results are compared with Einstein's classic result for Brownian motion \cite{Gardiner:2004}:
\begin{equation}
\label{eqn_number_density}
f(z,t) = \frac{n}{4\pi D} \frac{\exp \left( -z^2/4Dt \right)}{\sqrt{t}}
\end{equation}
where $f(z,t)$ is the particle number density at lateral distance $z$ from the source at time $t$, $n$ is the total number of particles in the system.  A virtual phase doppler particle analyzer (PDPA) is set up to measure the FDS number concentration at the outlet of the channel as a function of height, $z$.  The outlet is 15 m downstream of the point source of tracer particles.  With a mean velocity of 1 m/s, the time is taken as $t = 15$ s.  The FDS results are compared with Eq.~(\ref{eqn_number_density}) in Fig.~\ref{random_walk_fig}.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/random_walk_1} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/random_walk_2}
\end{tabular*}
\caption[Turbulent dispersion of tracer particles]{Turbulent dispersion of tracer particles \textct{random\_walk} test cases.}
\label{random_walk_fig}
\end{figure}




\chapter{Heating, Ventilating, and Air Conditioning (HVAC)}

\section{Duct Flow Losses (\texorpdfstring{\textct{HVAC\_flow\_loss}}{HVAC\_flow\_loss})}
\label{HVAC_flow_loss}

The pressure drop due to steady flow in a duct is given by
\be
\Delta p = \frac{K \rho \, u^2}{2}  \label {HVAC_steady_state}
\ee
where $K$ is the loss coefficient for the duct, $\rho$ is the gas density, and $u$ is the mean velocity. In this example, a duct is split at a tee joint into two ducts. All ducts have the same cross sectional area.  The primary duct is assigned a constant flow rate of 0.3~\si{m^3/s}.  The other two ducts are assigned loss coefficients of 4 and 16 and outlets at the same elevation.  From Eq.~(\ref{HVAC_steady_state}), it can be shown that since the two branch ducts have the same pressure at their outlets, the steady-state velocities in the three ducts should be 3~m/s, 2~m/s, and 1~m/s.  FDS results are shown in Fig.~\ref{fig_HVAC_loss}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_flow_loss}
\caption[The \textct{HVAC\_flow\_loss} test case]{Duct velocities in three ducts with different loss coefficients.}
\label{fig_HVAC_loss}
\end{figure}


\section{Node Flow Losses (\texorpdfstring{\textct{HVAC\_tee\_loss\_1}}{HVAC\_tee\_loss\_1}, \texorpdfstring{\textct{HVAC\_tee\_loss\_2}}{HVAC\_tee\_loss\_2})}
\label{HVAC_tee_loss_1}
\label{HVAC_tee_loss_2}

These two cases use the same geometry as in Section~\ref{HVAC_flow_loss}. However, instead of losses assigned to the ducts, the losses are assigned to the duct nodes.  In the first case, \textct{HVAC\_tee\_loss\_1}, the flow goes into the primary leg of the tee. The secondary branches are assigned loss coefficients of 15 and 3 and the discharge nodes are assigned losses of 1.  This gives total losses of 16 and 4. In the second case, \textct{ HVAC\_tee\_loss\_2}, the flow goes out the primary leg of the tee. Duct directions are reversed so the sign on velocity remains the same as in the first case.  The same flow losses are assigned.  It is expected that the duct velocities in both cases should be 3~m/s, 2~m/s, and 1~m/s.  FDS results are shown in Fig.~\ref{fig_HVAC_node}.

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_tee_loss_1}  &
      \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_tee_loss_2}
   \end{tabular*}
   \caption[The \textct{HVAC\_tee\_loss} test cases]{Duct velocities with varied node loss. \textct{HVAC\_tee\_loss\_1} (left) and \textct{HVAC\_tee\_loss\_2} (right).}
   \label{fig_HVAC_node}
\end{figure}



\section{HVAC Mass Conservation (\texorpdfstring{\textct{HVAC\_mass\_conservation}}{HVAC\_mass\_conservation})}
\label{HVAC_mass_conservation}

A 1~m by 1~m by 1~m compartment is initialized with the lower half of the compartment being filled with a species called \textct{SPEC1} having the same molecular weight as air, see Fig.~\ref{fig_HVAC_mass}.   An HVAC system of two ducts is created with one duct taking suction from the lower half (red vent) and discharging into the upper half (blue vent), and the second duct taking suction from the upper half (green vent) and discharging into the lower half (yellow vent).  The two ducts are assigned the same volume flow rate.  It is expected that the total mass in the compartment will be conserved, that the mass of the second species will be conserved (at 50 \% of the total mass), and that at the start of the computation a slice file of species will show pure ambient being discharged in the lower half and pure \textct{SPEC1} being discharged in the upper half.

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_conservation} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_conservation_plot} }
   \end{tabular*}
   \caption[The \textct{HVAC\_mass\_conservation} case]{SPEC1 mass fraction at 1 s (left) and SPEC1 and total mass (right).}
   \label{fig_HVAC_mass}
\end{figure}



\section{HVAC Energy Conservation and Pressure (\texorpdfstring{\textct{HVAC\_energy\_pressure}}{HVAC\_energy\_pressure})}
\label{HVAC_energy_pressure}

A 1~m by 1~m by 1~m box is divided into two equal compartments by a vertical wall, see Fig.~\ref{fig_HVAC_e_p}.
The ambient species is defined with a molecular weight of 28 g/mol, a specific heat of 1 \si{kJ/(kg.K)} and a specific enthalpy of 293.15~kJ/kg at the reference temperature of 293.15~K.
The left side of the compartment is initialized to twice the ambient temperature.  A simple HVAC system of ducts is created.
The first duct takes suction from the lower left half and discharges into the lower right half and is given an area of 0.1 m$^2$ and fixed volume flow rate 0.1 \si{m^3/s}.
The second duct is placed in the upper half of the compartment and is assigned a flow loss of 1 and an area of 0.01 m$^2$.  It is expected that the top and bottom duct velocities will be 10 m/s and 1 m/s respectively, the total energy will be conserved, that at the start of the computation hot gas will be seen entering the lower right and cold gas entering the upper left, and that at the end of the computation the pressure difference between the two sides will be 56.3 Pa based on Eq.~(\ref{HVAC_steady_state})

\begin{figure}[ht]
\noindent
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_energy_pressure} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_e_p_velocity} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_e_p_enthalpy} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_e_p_pressure}
\end{tabular*}
\caption[The \textct{HVAC\_energy\_pressure} case]{Clockwise from top left: Temperature at 1 s, duct velocities, total enthalpy in the domain, and duct node pressures for the top duct.}
\label{fig_HVAC_e_p}
\end{figure}


\section{HVAC Dampers (\texorpdfstring{\textct{HVAC\_damper}}{HVAC\_damper})}
\label{HVAC_damper}

The \textct{HVAC\_damper} example case is a simple duct network of three ducts connected by a tee.  A damper is present in one of the ducts and linked to a \textct{DEVC} that will change state at 10~s.  With the damper open, the respective duct flow speeds should be 3~m/s, 1~m/s, and 2~m/s.  When the damper closes, the respective duct flow speeds should be 3~m/s, 3~m/s, and~0 m/s.  Results of this are shown in Fig.~\ref{fig:HVAC_damper}.

\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_damper}
\caption[Example case \textct{HVAC\_damper}]{Simple duct network with a damper, case \textct{HVAC\_damper}.}
\label{fig:HVAC_damper}
\end{figure}



\section{HVAC Filters (\texorpdfstring{\textct{HVAC\_filter}}{HVAC\_filter})}
\label{HVAC_filter}

The sample case \textct{HVAC\_filter} demonstrates the use of the filter input.  A 1~m$^3$ compartment is initialized with a particulate species with a mass fraction of 0.001.  A 100 \% efficient filter with a clean loss of 1 and a loading loss of 7732.446~kg$^{-1}$ (gives a total loss of 10 when all the soot in the compartment is filtered).  A quadratic fan in a 0.01 m$^2$ duct with a maximum pressure of 20~Pa and a maximum flow of 0.2~\si{m^3/s} takes suction from one side of the compartment and discharges into the other.  Over time, the filter removes the particulate from the compartment.  However, since the filter loss increases with the mass of particulate filtered, the rate of removal will decrease over time.  Applying the conservation of energy to the compartment and the steady state duct momentum equation to the duct, we can solve for the compartment temperature and pressure and the duct velocity.  These results along with the loading of the filter and the mass of particulate in the compartment are shown in Fig.~\ref{fig_filter}.

\begin{figure}[h!]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_filter_p} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_filter_t} } \\
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_filter_v} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_filter_kg} }
   \end{tabular*}
   \caption[Results for the \textct{HVAC\_filter} sample case]{Compartment pressure (upper left), compartment temperature (upper right), duct velocity (lower left), and particulate mass in the compartment and on the filter (lower right).}
   \label{fig_filter}
\end{figure}


\section{HVAC Fans (\texorpdfstring{\textct{fan\_test}}{fan\_test})}
\label{fan_test}

Two compartments share a common wall. Both compartments are considered as separate ``pressure zones.'' Two, 0.04~m$^2$ HVAC ducts are defined.  One has a quadratic fan with a maximum volumetric flow of 0.16~\si{m^3/s} and a stall pressure of 10~Pa. The second is an open duct with a flow loss of 10. The volume flow through the fans is obtained from the equation below:
\be
   \dot{V}_{\hbox{\footnotesize fan}} = \dot{V}_{\hbox{\footnotesize max}} \; \hbox{sign} (\Delta p_{\hbox{\footnotesize max}}-\Delta p) \sqrt{ \frac{ |\Delta p - \Delta p_{\hbox{\footnotesize max}}|}{\Delta p_{\hbox{\footnotesize max}} } }  \label{fan_curve2}
\ee
$\dot{V}_{\hbox{\footnotesize max}}=0.16$~\si{m^3/s} is the maximum output of the fan from Zone~1 to Zone~2 and 0.2~m/s is the flow speed from Zone~2 to Zone~1. $\Delta p_{\hbox{\footnotesize max}}=10$~Pa is the maximum pressure difference at which the fan can operate. In steady state, the volume flow from compartment to compartment should be equal and opposite in sign. This occurs when the positive pressure added by the fan equals the pressure drop due to the flow loss, $K$, through the return duct.  The volume flow through the duct for a given pressure drop can be found from the duct momentum equation ignoring all terms but the flow loss:
\be
   \dot{V}_{\hbox{\footnotesize fan}}=A_{\hbox{\footnotesize duct}} \sqrt{\frac{2 \Delta p}{\rho K}}
\ee
Setting the above equation equal to Eq.~(\ref{fan_curve2}), the pressure drop can be determined:
\be
   \sqrt{\frac {2 |p_2-p_1|}{ (1.2 \; \hbox{\si{kg/m^3}}) 10}} (0.04 \; \hbox{m}^2) = (0.16 \; \hbox{\si{m^3/s}})  \; \sqrt{ \frac{ |p_1-p_2-10 \; \hbox{Pa}|}{10 \; \hbox{Pa}}  }
\ee
The solution is $p_2=4.5$~Pa and $p_1=-4.5$~Pa (see Fig.~\ref{fan_test_fig}). Note that the sign of the volume flow in the duct indicates whether the flow is moving from the first node to the second (positive) or the second node to the first (negative). This convention can make these types of calculations a bit tricky.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/fan_test_Pressure} &
\includegraphics[height=2.2in]{SCRIPT_FIGURES/fan_test_Volume_Flow}
\end{tabular*}
\caption[Results of the \textct{fan\_test} case]{Pressure and volume flow for the \textct{fan\_test}.}
\label{fan_test_fig}
\end{figure}


\section{Leakage}

In the following examples, both leaks and fans are demonstrated.

\subsection{Single Zone Leakage (\texorpdfstring{\textct{leak\_test}}{leak\_test})}
\label{single_zone_leak}
\label{leak_test}

Two compartments (each 0.9~m by 1~m by 1~m) are connected by a small fan and a leak at the floor. The volume flow rate of the fan is given by the ``fan curve'':
\be
  \dot{V}_{\hbox{\footnotesize fan}} = A_{\hbox{\footnotesize duct}}
  U_{\hbox{\footnotesize max}} \;
   \hbox{sign} (\Delta p_{\hbox{\footnotesize max}}-\Delta p)
   \sqrt{ \frac{ |\Delta p - \Delta p_{\hbox{\footnotesize max}}|}{\Delta p_{\hbox{\footnotesize max}} } }
\ee
where $\Delta p$ is the difference in pressure and $A_{\hbox{\scriptsize duct}}=0.1$~m$^2$, $U_{\hbox{\scriptsize max}}=0.6$~m/s, and $\Delta p_{\hbox{\scriptsize max}}=300$~Pa. The volume flow due to the leak is given by:
\be
   \dot{V}_{\hbox{\scriptsize leak}} = A_{\hbox{\scriptsize leak}} \sqrt{ \frac{ 2 \Delta p}{ \rho} }
\ee
where $A_{\hbox{\scriptsize leak}}=0.002$~m$^2$ and $\rho$ is the density at the discharge side. Equating the fan and leak volume flow rates, we can solve for $\Delta p$. The results are shown in Fig.~\ref{leak_test_fig}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/leak_test}
\caption[The \textct{leak\_test} case]{Pressure difference between two compartments with leakage connected by a fan.}
\label{leak_test_fig}
\end{figure}

\subsection{Multiple Zone Leakage (\texorpdfstring{\textct{leak\_test\_2}}{leak\_test\_2})}
\label{leak_test_2}

This case starts with the same input as \textct{leak\_test}.  A second leakage vent is added to the floor of the discharge side of the fan.  This vent leaks to the ambient.  When the simulation starts the fan pushes air from one compartment to the other. As the pressure rises, the leakage increases until the leakage flow rate is equal to the fan flow rate. Since some air from the interior compartment is being discharged to the ambient, the average pressure of the two compartments decreases until the pressure of the interior compartment is equal to that of the ambient. At this point in time, there is no more leakage to the outside and the fan flow rate equals the leakage flow rate between the two compartments.  Given the leakage area and the fan curve, this occurs when the pressure difference between the two compartments is the same as the pressure difference from \textct{leak\_test}, only now the discharge side should be at 0~Pa.

\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/leak_test_2_vector} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/leak_test_2} }
   \end{tabular*}
   \caption[The \textct{leak\_test\_2} test case]{Vector plot of pressure at 10 s with geometry clipped to show compartment interiors (left) and a plot of zone pressures (right).}
   \label{fig_HVAC_leak_fan}
\end{figure}

\subsection{Multiple Zone, Multiple Mesh Leakage (\texorpdfstring{\textct{zone\_shape\_2}}{zone\_shape\_2})}
\label{zone_shape_2}

A duct with a square 1~m cross section winds its way through a 2 by 2 by 2 array of meshes that span a sealed 6.2~m cubic domain. A fan forces air into one end of the duct at a rate of $\dot{V}=0.1$~m$^3$/s. The other end of the duct has a leak with effective area $A_\mathrm{L}=0.007746$~m$^2$. The expected pressure difference between the interior and exterior of the duct is
\be
   \Delta p = \frac{\rho}{2} \left( \frac{\dot{V}}{A_\mathrm{L}} \right)^2 \approx 100 \; \mathrm{Pa}
\ee
The overall mass in the domain should not change. Figure~\ref{fig_zone_shape_2} displays the pressure difference and overall mass.
\begin{figure}[ht]
   \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/zone_shape_2_pres} } &
      \scalebox{1.0}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/zone_shape_2_mass} }
   \end{tabular*}
   \caption[The \textct{zone\_shape\_2} test case]{(Left) Pressure difference between interior and exterior of the duct. (Right) Overall mass.}
   \label{fig_zone_shape_2}
\end{figure}


\subsection{Leak Pressure Exponent (\texorpdfstring{\textct{HVAC\_leak\_exponent}}{HVAC\_leak\_exponent})}
\label{HVAC_leak_exponent}

In a typical building as the interior pressure rises, the leakage area will grow as small gaps, cracks, and other leakage paths open up. Leakage tests performed according to test standards such as ASTM~E~779 provide two additional data points to quantify this behavior. These are the {\ct LEAK\_PRESSURE\_EXPONENT} and the {\ct LEAK\_REFERENCE\_PRESSURE}. The use of these additional inputs are shown in the equation below as $n$ and $\Delta p_{\rm ref}$ respectively where $A_{\rm L,ref}$ is given by {\ct LEAK\_AREA}.
\be  A_{\rm L} = A_{\rm L,ref} \left( \frac{\Delta p}{\Delta p_{\rm ref}} \right)^{n-0.5} \ee
By default, $n=0.5$ and $\Delta p_{\rm ref}=4$~Pa, meaning that the leak area will not change with pressure unless you specify an exponent other than 0.5.

This verification case has three 1000~m$^3$ compartments have 0.01~m$^2$ of leakage to the ambient. Each compartment is supplied with 0.16~$m^3/s$ of inlet flow. The first compartment has the default values for the exponent and reference pressure, the second changes the exponent to 0.6, and the third third changes exponent and the reference pressure respectively to 0.6 and 10~Pa. The expected leakage velocities for these conditions are 160~m/s, 11.8~m/s, and 12.8~m/s. Note in Figure \ref{leak_exponent_fig} the velocities are negative as the FDS output for the leakage velocity is from the lower numbered pressure zone (in this case ambient) to the higher number (inside the compartment). Negative velocity indicates flow from inside to outside as expected.

\begin{figure}[ht]
	\centering
	\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_leak_exponent}
	\caption[The \textct{HVAC\_leak\_exponent} case]{Velocities through leakage with varying \textct{LEAK\_PRESSURE\_EXPONENT} and \textct{LEAK\_REFERENCE\_PRESSURE}}
	\label{leak_exponent_fig}
\end{figure}

\section{ASHRAE Sample Problem 7\\(\texorpdfstring{\textct{ashrae\_7\_fixed\_flow}}{ashrae\_7\_fixed\_flow}, \texorpdfstring{\textct{ashrae\_7\_quadratic}}{ashrae\_7\_quadratic}, \texorpdfstring{\textct{ashrae\_7\_table}}{ashrae\_7\_table})}
\label{ashrae7}
\label{ashrae7_fixed_flow}
\label{ashrae7_quadratic}
\label{ashrae7_table}

ASHRAE Sample Problem 7~\cite{ASHRAE} is a simple HVAC system that represents a metal working exhaust system for a machine shop where particulates from three pieces of equipment are removed by a dust collector.  The network, shown in Fig.~\ref{ASHRAE7}, consists of three inlets, two tees, the dust collector, and a fan.  The lengths, diameters, and friction losses for all the components are specified, as well as the fan flow rate. The pressure drops and flow rates can be computed by hand.  Also listed in Fig.~\ref{ASHRAE7} are the predicted pressure drops for a fan with a fixed flow rate, a fan with a quadratic fan curve (\textct{MAX\_FLOW=2.4094, MAX\_PRESSURE=3000.}) that includes the fixed flow state (i.e., the flow rate of 1.45~\si{m^3/s} and pressure drop of 1913.5~Pa from the fixed flow simulation sits on the quadratic curve), and a fan with a \textct{RAMP} to define the same quadratic fan curve at 500~Pa intervals. The hand calculations assume a constant density, whereas the FDS computation will have a slightly non-uniform density in the network due to pressure drops. It is expected that there will be small differences that will be more noticeable at higher pressure changes.  Additionally since specifying a fan curve via a table results in a piecewise linear approximation, it is expected that the user-defined fan curve results will vary slightly from the quadratic and fixed flow results.


\begin{figure}[ht]
\centering
\includegraphics[width=4.in]{FIGURES/ashrae_7}
\IfFileExists{SCRIPT_FIGURES/ashrae_7.tex}{\input{SCRIPT_FIGURES/ashrae_7.tex}}{\typeout{Error: Missing file SCRIPT_FIGURES/ashrae_7.tex}}
\caption[Results of \textct{ashrae7} test cases]{Schematic of ASHRAE Sample Problem 7, and tabulated pressure drops (Pa) for a fixed flow fan curve, quadratic fan curve, and a table defined fan curve.}
\label{ASHRAE7}
\end{figure}

\section{HVAC transient mass transport}
This section documents verification of the mass transport subroutine of the HVAC module. Unless otherwise stated, the general test case has a \SI{1}{\meter\cubed} domain split into two equally sized compartments (being their own pressure zones) connected in some manner by an HVAC network. The left and right compartments are initialized with species~1 and species~2 respectively. Both species have an initial density of \SI[per-mode=symbol]{1.0}{\kilogram\per\meter\cubed}. The ducts have a cross sectional area of \SI{0.01}{m^2} and a flow rate of \SI[per-mode=symbol]{0.01}{\meter\cubed\per\second} (velocity of \SI[per-mode=symbol]{1}{\meter\per\second}).

\subsection{Convergence study for HVAC mass transport (\texorpdfstring{\textct{HVAC\_convergence\_study\_x}}{HVAC\_mass\_transport\_conv\_x})}
\label{HVAC_mass_transport_conv_0020}
\label{HVAC_mass_transport_conv_0040}
\label{HVAC_mass_transport_conv_0080}
\label{HVAC_mass_transport_conv_0160}
\label{HVAC_mass_transport_conv_0320}
The time-dependent mass transport subroutine is an explicit Euler method solver which uses a Godunov upwinding scheme. This method is formally first-order accurate in space and should exhibit L1 and L2 norm error decay rates of \(O(\Delta x)\) for a continuous solution.

We undertake a convergence study to demonstrate that the adopted numerical method exhibits the expected spatial error decay. The two compartments are connected with a single \SI{1}{\meter} long duct which is initialized using linear interpolation between the upstream and downstream duct node. In this manner the mass fraction of species~1 linearly decreases from \num{1} to \SI[per-mode=symbol]{0}{\kilogram\per\kilogram}. If we examine the species~1 mass fraction at the downstream node we expect to see it's value increase linearly from \num{0} to \SI[per-mode=symbol]{1}{\kilogram\per\kilogram} between \SI{0}{\second} to \SI{1}{\second} and then to remain at \SI[per-mode=symbol]{1}{\kilogram\per\kilogram} until the end of the simulation. The mass fraction of species 1 at the downstream duct node is examined and compared to the analytical result for a range of duct cell numbers (20, 40, 80, 160 and 320). The time step is fixed to satisfy the CFL of the case cell size (CFL \(= \Delta x/2u\)); this ensures that the \(\Delta x/\Delta t\) ratio is fixed for each case. Fig.~\ref{fig_HVAC_mass_transport_conv_1} shows the mass fraction at the downstream duct node for all cases and the analytical solution. Fig.~\ref{fig_HVAC_mass_transport_conv_2} gives the L1 and L2 norm errors.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_convergence_1}
\caption[\textct{HVAC\_mass\_transport\_conv\_x} test case result.]{Species~\num{1} mass fraction in the downstream duct node for the cell size convergence study. The mass fraction starts at zero and then linearly increases due to the initial conditions in the duct. At \SI{1}{\second} the mass fraction reaches its maximum and remains at this value until the end of the simulation. The figure illustrates that at lower cell counts (blue line) there is increased numerical diffusivity and that, for higher cell counts (cyan line), the numerical solution converges towards the analytical solution (black dashed line).}
\label{fig_HVAC_mass_transport_conv_1}
\end{figure}

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_convergence_2} } &
      \scalebox{1}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_convergence_3} }
   \end{tabular*}
\caption[\textct{HVAC\_mass\_transport\_conv\_x} L1 and L2 error results.]{L1 (left) and L2 (right) norm errors in mass fraction for the convergence study using various cell numbers (320, 160, 80, 40, 20 from left to right). The plot demonstrates errors decreasing for increasing cell numbers (i.e. decreasing cell size). L1 and L2 norm errors decay at \(O(\Delta x)\).}
\label{fig_HVAC_mass_transport_conv_2}
\end{figure}

\subsection{Transport time (\texorpdfstring{\textct{HVAC\_mass\_transport}}{HVAC\_mass\_transport})}
\label{HVAC_mass_transport}
A single \SI{10}{\meter} long duct connects the two compartments. The duct is initialized using data from the right duct node (i.e. species 2). As HVAC does not account for diffusion in the duct (only advection) we expect to see species~1 mass fraction at the downstream duct node start and remain at \SI[per-mode=symbol]{0}{\kilogram\per\kilogram} until \SI{10}{\second} and then instantaneously increase to \SI[per-mode=symbol]{1}{\kilogram\per\kilogram}. Ideal result and FDS output is presented in Fig.~\ref{fig_HVAC_mass_transport}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport}
\caption[\textct{HVAC\_mass\_transport} test case.]{Species \num{1} mass fraction in the downstream duct node.}
\label{fig_HVAC_mass_transport}
\end{figure}

\subsection{Duct definition sensitivity analysis (\texorpdfstring{\textct{HVAC\_mass\_transport\_x}}{HVAC\_mass\_transport\_\x})}
\label{HVAC_mass_transport_1}
\label{HVAC_mass_transport_2}
\label{HVAC_mass_transport_3}
\label{HVAC_mass_transport_4}
A sensitivity analysis is carried out to verify that results are not sensitive to differing methods of defining the same duct network. The general arrangement is identical to that of Section~\ref{HVAC_mass_transport}. Test cases \numrange{1}{4} incorporate the use of increasing numbers of \textct{DUCT}s (one, two, four and five respectively) and affiliated \textct{DUCTNODE}s but the number of cells in the discretized duct (\textct{N\_CELLS}), and hence the cell size, remains identical. We look at species \num{1} mass fraction at the downstream \textct{DUCTNODE} and expect to see no variation in the results for the differing number of \textct{DUCT}s. Ideal result and FDS output is presented in Fig.~\ref{fig_HVAC_mass_transport_x}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_x}
\caption[\textct{HVAC\_mass\_transport\_x} test case.]{Species \num{1} mass fraction in the downstream duct node for different duct definitions. Although different numbers of ducts are used, the number of cells is identical for all cases. Therefore the output for all cases should also be identical.}
\label{fig_HVAC_mass_transport_x}
\end{figure}

\subsection{Mass conservation 1 (\texorpdfstring{\textct{HVAC\_mass\_transport\_conservation\_1}}{HVAC\_mass\_transport\_conservation\_1})}
\label{HVAC_mass_transport_conservation_1}
The two compartments are connected by two ducts, A and B, each being \SI{10}{\meter} long. Duct~A is initialized with species~1 and has a flow from left to right and duct~B is initialized with species~2 and has a flow from right to left. The total mass in the FDS domain and in both compartments is expected to remain the same. The mass of species~1 in the left compartment is expected to decrease from \SI{0.5}{\kilogram} to \SI{0.25}{\kilogram} and in the right compartment it is expected to increase from \SI{0}{\kilogram} to \SI{0.25}{\kilogram}. The spatially mirrored behavior is expected of species~2. Fig.~\ref{fig_HVAC_mass_transport_conservation_1a} shows mass in the left compartment, right compartment and in the whole FDS domain. Fig.~\ref{fig_HVAC_mass_transport_conservation_1b} presents the species~1 and 2 masses in the left and right compartments.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_conservation_1a}
\caption[\textct{HVAC\_mass\_transport\_conservation\_1} test case.]{Total mass in the FDS domain and total mass in the left and right compartments.}
\label{fig_HVAC_mass_transport_conservation_1a}
\end{figure}

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_conservation_1b}
\caption[\textct{HVAC\_mass\_transport\_conservation\_1} test case.]{Species~1 and 2 masses in the left and right compartments.}
\label{fig_HVAC_mass_transport_conservation_1b}
\end{figure}

\subsection{Mass conservation 2 (\texorpdfstring{\textct{HVAC\_mass\_transport\_conservation\_2}}{HVAC\_mass\_transport\_conservation\_2})}
\label{HVAC_mass_transport_conservation_2}
The case setup is identical to that of Section~\ref{HVAC_mass_transport_conservation_1} with the exception of the length of duct~A is reduced to \SI{5}{\meter} and the length of duct~B is increased to \SI{20}{\meter}. This gives a total FDS and HVAC domain \(\text{species}\ 1 \colon \text{species}\ 2\) mass ratio of \(0.44 \colon 0.56\). We expect that the species~1 and 2 masses within the FDS domain will come to equilibrium at this ratio. Fig.~\ref{fig_HVAC_mass_transport_conservation_2} shows the total masses of species~1 and 2.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_conservation_2}
\caption[\textct{HVAC\_mass\_transport\_conservation\_2} test case.]{Total species~1 and 2 masses in the FDS domain. The initial equilibrium is prior to species~1 entering duct~B and species~2 entering duct~A.}
\label{fig_HVAC_mass_transport_conservation_2}
\end{figure}

\subsection{Mass conservation 3 (\texorpdfstring{\textct{HVAC\_mass\_transport\_conservation\_3}}{HVAC\_mass\_transport\_conservation\_3})}
\label{HVAC_mass_transport_conservation_3}
The case setup is identical to that of Section~\ref{HVAC_mass_transport_conservation_1} except that both ducts~A and B have a length of \SI{12.5}{\meter} and are initialized with species~2. This gives a total domain (FDS and HVAC) \(\text{species}\ 1 \colon \text{species}\ 2\) mass ratio of \(0.4 \colon 0.6\). We expect that the species~1 and 2 masses within the FDS domain will come to equilibrium at this ratio. Fig.~\ref{fig_HVAC_mass_transport_conservation_3} presents the ideal and FDS total masses of species~1 and 2.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_conservation_3}
\caption[\textct{HVAC\_mass\_transport\_conservtation\_3} test case.]{Total species~1 and 2 masses in the FDS domain. Due to the initial contents of the two ducts (species~2) the mass ratio of species~1 and 2 is \(0.4 \colon 0.6\); therefore at equilibrium this ratio should be observed throughout the domain.}
\label{fig_HVAC_mass_transport_conservation_3}
\end{figure}

\subsection{Transient transport through branching ducts (\texorpdfstring{\textct{HVAC\_mass\_transport\_branch}}{HVAC\_mass\_transport\_branch})}
\label{HVAC_mass_transport_branch}
The two compartments are connected by an HVAC network comprising a single \SI{5}{\meter} feed duct which branches into two ducts (ducts~A and B) at a tee with both ducts discharging to the right compartment. Ducts~A and B each have a cross-sectional area of \SI{0.005}{\meter\squared}, half that of the feed duct, and will therefore both have a velocity of \SI[per-mode=symbol]{1}{\meter\per\second}. Duct~A has a length of \SI{5}{\meter} and duct~B has a length of \SI{10}{\meter}. The duct network is initialized using data from the right compartment. Based on the duct lengths and a constant velocity we expect to see the species~\num{1} mass fraction at outlet~A and B increase from \num{0} to \SI[per-mode=symbol]{1}{\kilogram\per\kilogram} at \SI{10}{\second} and \SI{15}{\second} respectively. Ideal result and FDS output is presented in Fig.~\ref{fig_HVAC_mass_transport_branch}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_branch}
\caption[\textct{HVAC\_mass\_transport\_branch} test case.]{Species \num{1} mass fraction in the downstream duct nodes. The distance from the inlet to outlet~A and from the inlet to outlet~B is \SI{10}{\meter} and \SI{15}{\meter} respectively. Given a constant velocity of \SI[per-mode=symbol]{1}{\meter\per\second} through the network, the transport time from inlet to outlets~A and B should be \SI{10}{\second} and \SI{15}{\second} respectively.}
\label{fig_HVAC_mass_transport_branch}
\end{figure}

\subsection{Transient transport through combining ducts (\texorpdfstring{\textct{HVAC\_mass\_transport\_combine}}{HVAC\_mass\_transport\_combine})}
\label{HVAC_mass_transport_combine}
The left compartment is separated into two sub-compartments, A and B. These sub-compartments are initialized with species \numlist{1;2} respectively. An inlet vent is located in each sub-compartment and these vents are connected to separate ducts, of lengths \SI{1}{\meter} and \SI{2}{\meter} respectively, which combine at an internal tee. A single duct, with a length of \SI{1}{\meter}, connects this tee to the right compartment where it discharges to a single outlet into the right compartment. The right compartment and the duct network is initialized with species \num{3}. If we examine species mass fractions at the downstream outlet duct node we expect to see a species \num{3} mass fraction of \SI[per-mode=symbol]{1}{\kilogram\per\kilogram} for \SI{2}{\second}, a species \numlist{1;3} mass fraction of \SI[per-mode=symbol]{0.5}{\kilogram\per\kilogram} each from \SI{2}{\second} to \SI{3}{\second} and a species \numlist{1;2} mass fraction of \SI[per-mode=symbol]{0.5}{\kilogram\per\kilogram} each from \SI{3}{\second} until the end of the simulation. Ideal result and FDS output is presented in Fig.~\ref{fig_HVAC_mass_transport_combine}.

\begin{figure}[ht]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_combine}
\caption[\textct{HVAC\_mass\_transport\_branch} test case.]{Species mass fractions at the outlet duct node. Species~3 starts and remains at \SI[per-mode=symbol]{1}{\kilogram\per\kilogram} for \SI{2}{\second} as the initial contents of the duct flows out of the outlet. At \SI{2}{\second} the species from the sub-compartment connected via the shorter duct and the remaining initial species from the longer duct flows out of the outlet. At \SI{3}{\second} the species from the sub-compartment connected by the longer duct reaches the outlet and the mass fraction is split between the species from the two upstream sub-compartments - no initial species remains in the ducts.}
\label{fig_HVAC_mass_transport_combine}
\end{figure}

\subsection{Energy conservation and pressure (\texorpdfstring{\textct{HVAC\_mass\_transport\_energy}}{HVAC\_mass\_transport\_energy})}
\label{HVAC_mass_transport_energy}
The left compartment is initialized with a temperature of \SI{100}{\degreeCelsius}, the right compartment remains at ambient (\SI{20}{\degreeCelsius}). Both compartments and the duct network are initialized with a single species. The species has a specific heat of \SI[per-mode=symbol]{1}{\kilo\joule\per\kilogram\per\kelvin}. The compartments are connected by two separate ducts, duct~A and duct~B, both with a length of \SI{1}{\meter}. Duct~A has a specified flow from left to right with a velocity of \SI[per-mode=symbol]{1}{\meter\per\second}, duct~B has no defined flow and a minor losses coefficient of \num{2}. Duct~A and B are initialized using gas data from the left and right compartment duct nodes respectively. Based on Eq.~\ref{eq_HVAC_mass_transport_energy} enthalpy in the FDS domain should be \SI{293.15}{\kilo\joule} and should remain constant. Based upon Eq.~\ref{HVAC_steady_state} the pressure difference between the upstream and downstream duct node of duct~B should be \SI{0.8928}{\pascal}. Duct node pressure difference and total enthalpy are presented in Fig.~\ref{fig_HVAC_mass_transport_energy}.

\begin{equation}
h_{\mbox{\tiny CFD}} = c_p \frac{V(T_{\mbox{\tiny left}}}{2} \rho_{\mbox{\tiny left}}+T_{\mbox{\tiny right}} \rho_{\mbox{\tiny right}})
\label{eq_HVAC_mass_transport_energy}
\end{equation}

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
      \scalebox{1}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_energy_p} } &
      \scalebox{1}{ \includegraphics[height=2.2in]{SCRIPT_FIGURES/HVAC_mass_transport_energy_e} }
   \end{tabular*}
\caption[\textct{HVAC\_mass\_transport\_energy} $\Delta$ p and enthalpy results.]{Pressure difference between the inlet and outlet of duct~B (left). Total enthalpy in the CFD domain (right).}
\label{fig_HVAC_mass_transport_energy}
\end{figure}

%\chapter{Unstructured Geometry}
%
%%\section{Fluid-Structure Interaction}
%
%\section{Cut-cell Algorithm (\texorpdfstring\textct{tri\_cube\_cut\_cell\_test}{tri\_cube\_cut\_cell\_test})}
%
%A cut-cell algorithm is developed for calculating the intersection area between a triangle and a bounding box (e.g., Cartesian grid cell). It is difficult to directly calculate the intersection area, because the intersection shape is generally an irregular polygon. The area calculation can be divided into three steps. The first step is to obtain the points that the triangle-determined plane intersects with the bounding box edges. These points are sorted to give an intermediate polygon. Note that this intermediate polygon is in the same plane as the blue-edge triangle. The second step is to determine all vertices of the final intersection polygon, by checking whether the triangle edges are intersecting with the edges of the intermediate polygon. Lastly, the area can be easily calculated for the final polygon, which is always convex in this study.
%
%\IfFileExists{SCRIPT_FIGURES/cutcell_area.tex}{\input{SCRIPT_FIGURES/cutcell_area.tex}}{\typeout{Error: Missing file SCRIPT_FIGURES/cutcell_area.tex}}
%
% Twelve examples in which different triangles intersect with a bounding box are summarized in Table \ref{tab_cutcell_areas}.  NXP represents the vertices of the intersection polygon, whose area is calculated as shown. Examples (1) through (4) and (6) through (8) have a regular triangle intersection. Examples (5) and (9) have a point and line intersection, both with zero area. Examples (10), (11), and (12) are more complicated cases. The intersection polygon has six (6), seven (7), and nine (9) vertices, respectively.
%







\chapter{Outputs}

\section{Statistical Quantities}

\subsection{RMS, Co-Variance, and Cross-Correlation (\texorpdfstring{\textct{rms\_cov\_corr}}{rms\_cov\_corr})}

FDS can output the root mean square (RMS), co-variance, and cross-correlation for both point and line {\ct DEVC} outputs.  To test these outputs a 1 m$^3$ box with open sides and a 10 cm grid size is defined with two inlet vents centered on adjacent faces.  This results in two orthogonal flow streams that collide at the center of the box and exit diagonally.  Within the diagonal portion of the flow, are placed point measurements for the FDS outputs of the u-velocity RMS, the u-velocity/w-velocity co-variance, and the u-velocity/w-velocity cross-correlation.

Computation of the these quantities by their typical statistical definition would require having the entire time history for the velocities.  This is obviously not possible during run-time.  Instead FDS computes the values using logarithmic averaging and a user-defined averaging window.  One would expect, once steady-state conditions are reached, that the FDS predicted values should approach the analytic values.  Results are shown in Fig.~\ref{rms_cov_corr_plots}.  In each figure the red line represents the value computed using the entire time history after steady-state is reached.  As seen, the FDS predicted values approach the analytic values.

\begin{figure}[p]
\centering
\begin{tabular}{l}
\includegraphics[height=2.2in]{SCRIPT_FIGURES/rms_cov_corr_rms}\\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/rms_cov_corr_cov} \\
\includegraphics[height=2.2in]{SCRIPT_FIGURES/rms_cov_corr_corr}
\end{tabular}
\caption[Sample case \textct{rms\_cov\_corr}]{Output of the \textct{rms\_cov\_corr} test case.  By construction, the statistic matches the analytical result at time $t = \mbox{\ct T\_END}$.}
\label{rms_cov_corr_plots}
\end{figure}

\FloatBarrier

\subsection{RMS as a Running Average (\texorpdfstring{\textct{rms\_example}}{rms\_example})}
\label{rms_example}

In this example, we want to compute the mean and rms of a hypothetical velocity time series
\be
   u(t) = \tanh(t) + {\cal U}(-0.5,0.5)
\ee
where ${\cal U}(-0.5,0.5)$ is a uniformly distributed random variable. The expected RMS of the time series beyond its initial transient is equal to the standard deviation of the uniform distribution over the unit interval, $\sigma=\sqrt{1/12}\approx 0.2887$. The expected mean is 1. This exercise is as much a check of the intrinsic random number generator in Fortran as it is the computation within FDS. Figure~\ref{rms_example_plot} displays the result.
\begin{figure}[h!]
\centering
\includegraphics[height=2.2in]{SCRIPT_FIGURES/rms_example}
\caption[Sample case \textct{rms\_example}]{Output of the \textct{rms\_example} test case in which the mean and RMS of the time series is compared to expected values.}
\label{rms_example_plot}
\end{figure}
Note that this example is also a useful demonstration of how to use the math functions within FDS. Although there is not a tanh function included, it can be constructed from the expression:
\be
   \tanh(t) = \frac{{\rm e}^t - {\rm e}^{-t}}{{\rm e}^t + {\rm e}^{-t}}
\ee
using the base functions as shown below.
\begin{lstlisting}
&DEVC ID='rn',    QUANTITY='RANDOM NUMBER', XYZ=0,0,0 /
&DEVC ID='t',     QUANTITY='TIME', XYZ=0,0,0 /
&DEVC ID='u',     QUANTITY='CONTROL VALUE', CTRL_ID='sum', XYZ=0,0,1, UNITS='m/s' /
&DEVC ID='u_rms', QUANTITY='CONTROL VALUE', CTRL_ID='sum', XYZ=0,0,1, UNITS='m/s',
      STATISTICS='RMS', STATISTICS_START=5. /

&CTRL ID='exp(t)',  FUNCTION_TYPE='EXP',      INPUT_ID='t' /
&CTRL ID='-t',      FUNCTION_TYPE='MULTIPLY', INPUT_ID='t','CONSTANT', CONSTANT=-1. /
&CTRL ID='exp(-t)', FUNCTION_TYPE='EXP',      INPUT_ID='-t' /
&CTRL ID='num',     FUNCTION_TYPE='SUBTRACT', INPUT_ID='exp(t)','exp(-t)' /
&CTRL ID='den',     FUNCTION_TYPE='SUM',      INPUT_ID='exp(t)','exp(-t)' /
&CTRL ID='tanh',    FUNCTION_TYPE='DIVIDE',   INPUT_ID='num','den' /
&CTRL ID='rn2',     FUNCTION_TYPE='SUBTRACT', INPUT_ID='rn','CONSTANT', CONSTANT=0.5 /
&CTRL ID='sum',     FUNCTION_TYPE='SUM',      INPUT_ID='tanh','rn2' /
\end{lstlisting}



\bibliography{../Bibliography/FDS_refs,../Bibliography/FDS_general,../Bibliography/FDS_mathcomp}


\appendix

\chapter{Summary of Verification Results}
\label{info:verification_statistics}

This appendix summarizes the accuracy of cases in the FDS verification suite. These cases are an integral part of the continuous integration process for FDS in which daily source code changes are checked each night against this growing list of cases to verify the overall accuracy of FDS and to quickly identify errors introduced into the source code.

The verification cases that are listed in Table~\ref{summary_table} are described either in the FDS Verification Guide or the FDS User's Guide. Those cases that are in the User's Guide help to explain various input parameters. Dark blue links refer to sections in the Verification Guide; light blue links refer to the User's Guide. For each case, there are one or more point to point comparisons between an FDS predicted value and an exact or expected value. If the relative or absolute difference between the predicted and exact/expected values is within the specified tolerance, the case passes.

\begin{landscape}
\captionof{table}{Summary of verification cases.} \label{summary_table}
\IfFileExists{SCRIPT_FIGURES/Scatterplots/verification_statistics.tex}{\input{SCRIPT_FIGURES/Scatterplots/verification_statistics.tex}}{\typeout{Error: Missing file SCRIPT_FIGURES/Scatterplots/verification_statistics.tex}}
\end{landscape}



\chapter{Installation Testing}
\label{info:installation_testing}

The use of computer software for safety purposes is sometimes regulated under a software quality assurance (SQA) program by the Authority Having Jurisdiction.  For example, in the United States, both the Department of Energy (DOE) via DOE G 414.1-4~\cite{DOE_G_414} and the Nuclear Regulatory Commission (NRC) via NUREG-1737~\cite{NUREG_1737} impose specific requirements on software used for certain safety purposes.  In addition to imposing general requirements on configuration management and verification and validation, SQA programs often impose an acceptance testing requirement.  For simulation software, this involves a test program in which the software is used to execute a number of sample cases and the results are compared to accepted values.  The purpose of this testing process is to ensure that the software installation was successful and that no corruption of the software executable or libraries has occurred. The acceptance test procedure is as follows:

\begin{enumerate}
\item Obtain and install the version of FDS you will be running.  Note that this procedure will need to be repeated for each version of the FDS executable being used.
\item Find the files shown in Table~\ref{tbl:installation_test} in the {\ct Examples} folder of the FDS-SMV installation package.  The Folder listed in the table is a subfolder of the {\ct Examples} folder.
\item Run each of the FDS input files listed in Table~\ref{tbl:installation_test}. \label{itm:run_step}
\item Compare the results of each FDS Output File listed in Table~\ref{tbl:installation_test} with the exact/expected results in the corresponding Expected Results File. The Expected Results Files can be found at \\ \href{https://github.com/firemodels/fds/tree/master/Verification}{https://github.com/firemodels/fds/tree/master/Verification} \\
    This is a link to the FDS repository hosted by GitHub.
\item Verify that the expected results match the results from Step~\ref{itm:run_step} using the criteria shown in Appendix~\ref{info:verification_statistics}.
\end{enumerate}

\begin{landscape}
\centering
\captionof{table}[FDS Installation Test Suite]{FDS Installation Test Suite. Details of each case may be found in the listed section or reference. Note that the light blue colored links refer to the FDS User's Guide.} \label{tbl:installation_test}
\footnotesize
\begin{tabular}{|l|c|l|l|l|}
\hline
Folder                  & Reference                       & Input File                                 & FDS Output File                                  & Expected Results File \\ \hline \hline
Controls                & \ref{activate_vents}            & activate\_vents.fds                        & activate\_vents\_ctrl.csv                        & activate\_vents.csv \\ \hline
Pressure\_Effects       & \ref{isentropic2}               & isentropic2.fds                            & insentropic2\_devc.csv                           & isentropic2.csv \\ \hline
Energy\_Budget          & \ref{energy_budget_tmix}        & energy\_budget\_tmix.fds                   & energy\_budget\_tmix\_devc.csv                   & energy\_budget\_tmix.csv \\ \hline
Energy\_Budget          & \ref{energy_budget_walls}       & energy\_budget\_cold\_walls.fds            & energy\_budget\_cold\_walls\_hrr.csv             & energy\_budget\_cold\_walls.csv \\ \hline
Fires                   & \ref{spray_burner}              & spray\_burner.fds                          & spray\_burner\_hrr.csv                           & spray\_burner.csv \\ \hline
Heat\_Transfer          & \ref{heat_conduction_kc}        & heat\_conduction\_kc.fds                   & heat\_conduction\_kc\_devc.csv                   & heat\_conduction\_kc.csv \\ \hline
HVAC                    & \ref{ashrae7}                   & ashrae7\_table.fds                         & ashrae7\_table\_devc.csv                         & ashrae7\_exp.csv \\ \hline
Pressure\_Solver        & \ref{duct_flow}                 & duct\_flow.fds                             & duct\_flow\_devc.csv                             & duct\_flow.csv \\ \hline
Pyrolysis               & \ref{enthalpy}                  & enthalpy.fds                               & enthalpy\_devc.csv                               & enthalpy.csv \\ \hline
Pyrolysis               & \ref{shrink_swell}              & shrink\_swell.fds                          & shrink\_swell\_devc.csv                          & shrink\_swell.csv \\ \hline
Radiation               & \ref{radiation_shield}          & radiation\_shield.fds                      & radiation\_shield\_devc.csv                      & radiation\_shield.csv \\ \hline
Species                 & \ref{mixing_reactions}          & reactionrate\_EDC\_1step\_CH4\_nonmix.fds  & reactionrate\_EDC\_1step\_CH4\_nonmix\_devc.csv  & reactionrate\_arrhenius\_2order\_1step.csv \\ \hline
Species                 & \ref{finite_rate_reactions}     & reactionrate\_arrhenius\_2order\_1step.fds & reactionrate\_arrhenius\_2order\_1step\_devc.csv & reactionrate\_arrhenius\_2order\_1step.csv \\ \hline
Sprinklers\_and\_Sprays & \ref{water_evaporation_1}       & water\_evaporation\_1.fds                  & water\_evaporation\_1\_devc.csv                  &  water\_evaporation\_1.csv \\ \hline
Sprinklers\_and\_Sprays & \ref{particle_drag}             & particle\_drag\_U50\_N16.fds               & particle\_drag\_U50\_N16\_devc.csv               &  particle\_drag\_U50\_N16.csv \\ \hline

\end{tabular}
\end{landscape}


\end{document}
